1
- pg_arman fork from Postgres Professional
1
+ pg_probackup fork of pg_arman by Postgres Professional
2
2
========================================
3
3
4
- This repository contains fork of pg_arman by Postgres Professional with
5
- block level incremental backup support.
6
-
7
- pg_arman is a backup and recovery manager for PostgreSQL servers able to do
4
+ pg_probackup is a backup and recovery manager for PostgreSQL servers able to do
8
5
differential and full backup as well as restore a cluster to a
9
6
state defined by a given recovery target. It is designed to perform
10
7
periodic backups of an existing PostgreSQL server, combined with WAL
@@ -28,37 +25,37 @@ Download
28
25
--------
29
26
30
27
The latest version of this software can be found on the project website at
31
- https://github.com/postgrespro/pg_arman . Original fork of pg_arman can be
28
+ https://github.com/postgrespro/pg_probackup . Original fork of pg_probackup can be
32
29
found at https://github.com/michaelpq/pg_arman .
33
30
34
31
Installation
35
32
------------
36
33
37
- Compiling pg_arman requires a PostgreSQL installation to be in place
34
+ Compiling pg_probackup requires a PostgreSQL installation to be in place
38
35
as well as a raw source tree. Pass the path to the PostgreSQL source tree
39
36
to make, in the top_srcdir variable:
40
37
41
38
make USE_PGXS=1 top_srcdir=<path to PostgreSQL source tree>
42
39
43
40
In addition, you must have pg_config in $PATH.
44
41
45
- The current version of pg_arman is compatible with PostgreSQL 9.5 and
42
+ The current version of pg_probackup is compatible with PostgreSQL 9.5 and
46
43
upper versions.
47
44
48
45
Platforms
49
46
---------
50
47
51
- pg_arman has been tested on Linux and Unix-based platforms.
48
+ pg_probackup has been tested on Linux and Unix-based platforms.
52
49
53
50
Documentation
54
51
-------------
55
52
56
- All the documentation you can find [ here] ( doc/pg_arman .md ) .
53
+ All the documentation you can find [ here] ( doc/pg_probackup .md ) .
57
54
58
55
Regression tests
59
56
----------------
60
57
61
- The test suite of pg_arman is available in the code tree and can be
58
+ The test suite of pg_probackup is available in the code tree and can be
62
59
launched in a way similar to common PostgreSQL extensions and modules:
63
60
64
61
make installcheck
@@ -85,7 +82,7 @@ of these approach is requirement to have WAL archive.
85
82
some overhead to PostgreSQL performance. On our experiments it appears to be
86
83
less than 3%.
87
84
88
- These two approaches were implemented in this fork of pg_arman . The second
85
+ These two approaches were implemented in this fork of pg_probackup . The second
89
86
approach requires [ patch for PostgreSQL 9.5] ( https://gist.github.com/stalkerg/44703dbcbac1da08f448b7e6966646c0 ) or
90
87
[ patch for PostgreSQL 10] ( https://gist.github.com/stalkerg/ab833d94e2f64df241f1835651e06e4b ) .
91
88
@@ -101,29 +98,29 @@ You need to enable WAL archive by adding following lines to postgresql.conf:
101
98
102
99
```
103
100
wal_level = archive
104
- archive_command = 'test ! -f /home/postgres/backup/arman/ wal/%f && cp %p /home/postgres/backup/arman /wal/%f'
101
+ archive_command = 'test ! -f /home/postgres/backup/wal/%f && cp %p /home/postgres/backup/wal/%f'
105
102
```
106
103
107
104
Example backup (assuming PostgreSQL is running):
108
105
``` bash
109
106
# Init pg_aramn backup folder
110
- pg_arman init -B /home/postgres/backup/pgarman
107
+ pg_probackup init -B /home/postgres/backup
111
108
# Make full backup with 2 thread and verbose mode.
112
- pg_arman backup -B /home/postgres/backup/pgarman -D /home/postgres/pgdata/arman -b full -v -j 2
109
+ pg_probackup backup -B /home/postgres/backup -D /home/postgres/pgdata -b full -v -j 2
113
110
# Show backups information
114
- pg_arman show -B /home/postgres/backup/pgarman
111
+ pg_probackup show -B /home/postgres/backup
115
112
116
113
# Now you can insert or update some data in your database
117
114
118
115
# Then start the incremental backup.
119
- pg_arman backup -B /home/postgres/backup/pgarman -D /home/postgres/pgdata/arman -b page -v -j 2
116
+ pg_probackup backup -B /home/postgres/backup -D /home/postgres/pgdata -b page -v -j 2
120
117
# You should see that increment is really small
121
- pg_arman show -B /home/postgres/backup/pgarman
118
+ pg_probackup show -B /home/postgres/backup
122
119
```
123
120
124
121
For restore after remove your pgdata you can use:
125
122
```
126
- pg_arman restore -B /home/postgres/backup/pgarman -D /home/postgres/pgdata/arman -j 4 --verbose
123
+ pg_probackup restore -B /home/postgres/backup -D /home/postgres/pgdata -j 4 --verbose
127
124
```
128
125
129
126
### Retrieving changed blocks from ptrack
@@ -134,33 +131,33 @@ The advantage of this approach is that you don't have to save WAL archive. You
134
131
ptrack_enable = on
135
132
```
136
133
137
- Also, some WALs still need to be fetched in order to get consistent backup. pg_arman can fetch them trough the streaming replication protocol. Thus, you also need to [ enable streaming replication connection] ( https://wiki.postgresql.org/wiki/Streaming_Replication ) .
134
+ Also, some WALs still need to be fetched in order to get consistent backup. pg_probackup can fetch them trough the streaming replication protocol. Thus, you also need to [ enable streaming replication connection] ( https://wiki.postgresql.org/wiki/Streaming_Replication ) .
138
135
139
136
Example backup (assuming PostgreSQL is running):
140
137
``` bash
141
138
# Init pg_aramn backup folder
142
- pg_arman init -B /home/postgres/backup/pgarman
139
+ pg_probackup init -B /home/postgres/backup
143
140
# Make full backup with 2 thread and verbose mode.
144
- pg_arman backup -B /home/postgres/backup/pgarman -D /home/postgres/pgdata/arman -b full -v -j 2 --stream
141
+ pg_probackup backup -B /home/postgres/backup -D /home/postgres/pgdata -b full -v -j 2 --stream
145
142
# Show backups information
146
- pg_arman show -B /home/postgres/backup/pgarman
143
+ pg_probackup show -B /home/postgres/backup
147
144
148
145
# Now you can insert or update some data in your database
149
146
150
147
# Then start the incremental backup.
151
- pg_arman backup -B /home/postgres/backup/pgarman -D /home/postgres/pgdata/arman -b ptrack -v -j 2 --stream
148
+ pg_probackup backup -B /home/postgres/backup -D /home/postgres/pgdata -b ptrack -v -j 2 --stream
152
149
# You should see that increment is really small
153
- pg_arman show -B /home/postgres/backup/pgarman
150
+ pg_probackup show -B /home/postgres/backup
154
151
```
155
152
156
153
For restore after remove your pgdata you can use:
157
154
```
158
- pg_arman restore -B /home/postgres/backup/pgarman -D /home/postgres/pgdata/arman -j 4 --verbose --stream
155
+ pg_probackup restore -B /home/postgres/backup -D /home/postgres/pgdata -j 4 --verbose --stream
159
156
```
160
157
161
158
License
162
159
-------
163
160
164
- pg_arman can be distributed under the PostgreSQL license. See COPYRIGHT
161
+ pg_probackup can be distributed under the PostgreSQL license. See COPYRIGHT
165
162
file for more information. pg_arman is a fork of the existing project
166
163
pg_rman, initially created and maintained by NTT and Itagaki Takahiro.
0 commit comments