You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/tutorial/disaster-recovery.md
+25-9Lines changed: 25 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,17 +93,23 @@ The above is all you need to do to clone a Postgres cluster! PGO will work on cr
93
93
94
94
## Perform a Point-in-time-Recovery (PITR)
95
95
96
-
Did someone drop the user table? You may want to perform a point-in-time-recovery (PITR) to revert your database back to a state before a change occurred. Fortunately, PGO can help you do that.
96
+
Did someone drop the user table? You may want to perform a point-in-time-recovery (PITR)
97
+
to revert your database back to a state before a change occurred. Fortunately, PGO can help you do that.
97
98
98
-
You can set up a PITR using the [restore](https://pgbackrest.org/command.html#command-restore) command of [pgBackRest](https://www.pgbackrest.org), the backup management tool that powers the disaster recovery capabilities of PGO. You will need to set a few options on `spec.dataSource.postgresCluster.options` to perform a PITR. These options include:
99
+
You can set up a PITR using the [restore](https://pgbackrest.org/command.html#command-restore)
100
+
command of [pgBackRest](https://www.pgbackrest.org), the backup management tool that powers
101
+
the disaster recovery capabilities of PGO. You will need to set a few options on
102
+
`spec.dataSource.postgresCluster.options` to perform a PITR. These options include:
99
103
100
104
-`--type=time`: This tells pgBackRest to perform a PITR.
101
-
-`--target`: Where to perform the PITR to. An example recovery target is `2021-06-09 14:15:11-04`. The timezone specified here as -04 for EDT. Please see the [pgBackRest documentation for other timezone options](https://pgbackrest.org/user-guide.html#pitr).
105
+
-`--target`: Where to perform the PITR to. An example recovery target is `2021-06-09 14:15:11-04`.
106
+
The timezone specified here as -04 for EDT. Please see the [pgBackRest documentation for other timezone options](https://pgbackrest.org/user-guide.html#pitr).
102
107
-`--set` (optional): Choose which backup to start the PITR from.
103
108
104
109
A few quick notes before we begin:
105
110
106
-
- To perform a PITR, you must have a backup that is older than your PITR time. In other words, you can't perform a PITR back to a time where you do not have a backup!
111
+
- To perform a PITR, you must have a backup that finished before your PITR time.
112
+
In other words, you can't perform a PITR back to a time where you do not have a backup!
107
113
- All relevant WAL files must be successfully pushed for the restore to complete correctly.
108
114
- Be sure to select the correct repository name containing the desired backup!
109
115
@@ -160,21 +166,29 @@ spec:
160
166
161
167
Notice how we put in the options to specify where to make the PITR.
162
168
163
-
Using the above manifest, PGO will go ahead and create a new Postgres cluster that recovers its data up until `2021-06-09 14:15:11-04`. At that point, the cluster is promoted and you can start accessing your database from that specific point in time!
169
+
Using the above manifest, PGO will go ahead and create a new Postgres cluster that recovers
170
+
its data up until `2021-06-09 14:15:11-04`. At that point, the cluster is promoted and
171
+
you can start accessing your database from that specific point in time!
164
172
165
173
## Perform an In-Place Point-in-time-Recovery (PITR)
166
174
167
-
Similar to the PITR restore described above, you may want to perform a similar reversion back to a state before a change occurred, but without creating another PostgreSQL cluster. Fortunately, PGO can help you do this as well.
175
+
Similar to the PITR restore described above, you may want to perform a similar reversion
176
+
back to a state before a change occurred, but without creating another PostgreSQL cluster.
177
+
Fortunately, PGO can help you do this as well.
168
178
169
-
You can set up a PITR using the [restore](https://pgbackrest.org/command.html#command-restore) command of [pgBackRest](https://www.pgbackrest.org), the backup management tool that powers the disaster recovery capabilities of PGO. You will need to set a few options on `spec.dataSource.postgresCluster.options` to perform a PITR. These options include:
179
+
You can set up a PITR using the [restore](https://pgbackrest.org/command.html#command-restore)
180
+
command of [pgBackRest](https://www.pgbackrest.org), the backup management tool that powers
181
+
the disaster recovery capabilities of PGO. You will need to set a few options on
182
+
`spec.backups.pgbackrest.restore.options` to perform a PITR. These options include:
170
183
171
184
-`--type=time`: This tells pgBackRest to perform a PITR.
172
185
-`--target`: Where to perform the PITR to. An example recovery target is `2021-06-09 14:15:11-04`.
173
186
-`--set` (optional): Choose which backup to start the PITR from.
174
187
175
188
A few quick notes before we begin:
176
189
177
-
- To perform a PITR, you must have a backup that is older than your PITR time. In other words, you can't perform a PITR back to a time where you do not have a backup!
190
+
- To perform a PITR, you must have a backup that finished before your PITR time.
191
+
In other words, you can't perform a PITR back to a time where you do not have a backup!
178
192
- All relevant WAL files must be successfully pushed for the restore to complete correctly.
179
193
- Be sure to select the correct repository name containing the desired backup!
180
194
@@ -211,7 +225,9 @@ spec:
211
225
212
226
Notice how we put in the options to specify where to make the PITR.
213
227
214
-
Using the above manifest, PGO will go ahead and re-create your Postgres cluster that will recover its data up until `2021-06-09 14:15:11-04`. At that point, the cluster is promoted and you can start accessing your database from that specific point in time!
228
+
Using the above manifest, PGO will go ahead and re-create your Postgres cluster to recover
229
+
its data up until `2021-06-09 14:15:11-04`. At that point, the cluster is promoted and
230
+
you can start accessing your database from that specific point in time!
0 commit comments