Skip to content

Commit 6942626

Browse files
authored
Merge pull request #126 from vshn/add/point_in_time_config
Clarify PITR configurations
2 parents 718572c + 41b5796 commit 6942626

File tree

1 file changed

+26
-1
lines changed
  • docs/modules/ROOT/pages/vshn-managed/postgresql

1 file changed

+26
-1
lines changed

docs/modules/ROOT/pages/vshn-managed/postgresql/backup.adoc

+26-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
= Backups
22

33
Backups are enabled by default. The PostgreSQL instance will be backed up daily at a randomly chosen time between 22:00 and 4:00.
4-
The backup is done using https://www.postgresql.org/docs/current/app-pgbasebackup.html[`pg_basebackup`^] tool which supports _Point-in-Time Recovery_.
4+
The backup is done using https://pgbackrest.org/[`https://pgbackrest.org/`^] tool which supports _Point-in-Time Recovery_.
55
This approach allows to make a backup of an online database with minimum performance hit.
66
It also guarantees that the changes made to the data during the backup process will also end up in the backup files.
77

@@ -23,6 +23,31 @@ spec:
2323
----
2424
<1> The schedules for your backups.
2525

26+
== Point in Time interval
27+
28+
By default, the _WALs_ (Write Ahead Logs) will be shipped every time a _WAL_ file has been completed. They grow to 16Mb before being considered completed and be archived to the backup object store. This will result in variable https://en.wikipedia.org/wiki/IT_disaster_recovery#Recovery_Point_Objective[RPO] times.
29+
30+
If fixed RPO time is required, the `archive_timeout` setting can be set. It will force an archive of the _WAL_ files every given interval.
31+
32+
[source,yaml]
33+
----
34+
apiVersion: vshn.appcat.vshn.io/v1
35+
kind: VSHNPostgreSQL
36+
metadata:
37+
name: pgsql-app1-prod
38+
namespace: <your-namespace>
39+
spec:
40+
parameters:
41+
...
42+
service:
43+
pgSettings:
44+
archive_timeout: "300" <1>
45+
...
46+
----
47+
<1> Amount of time between _WAL_ archives in seconds
48+
49+
However, the _WAL_ files will always be 16Mb, even if it's not completed. So using this setting will most likely increase the data usage on the backup object store.
50+
2651
== Listing Backups
2752

2853
Get an overview of all backups performed of your database instance:

0 commit comments

Comments
 (0)