Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1534590

Browse files
committed
help: new option '--wal-depth'
1 parent 1d8a654 commit 1534590

File tree

2 files changed

+30
-3
lines changed

2 files changed

+30
-3
lines changed

src/help.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ help_pg_probackup(void)
9393
printf(_(" [--log-rotation-age=log-rotation-age]\n"));
9494
printf(_(" [--retention-redundancy=retention-redundancy]\n"));
9595
printf(_(" [--retention-window=retention-window]\n"));
96+
printf(_(" [--wal-depth=wal-depth]\n"));
9697
printf(_(" [--compress-algorithm=compress-algorithm]\n"));
9798
printf(_(" [--compress-level=compress-level]\n"));
9899
printf(_(" [--archive-timeout=timeout]\n"));
@@ -128,6 +129,7 @@ help_pg_probackup(void)
128129
printf(_(" [--delete-expired] [--delete-wal] [--merge-expired]\n"));
129130
printf(_(" [--retention-redundancy=retention-redundancy]\n"));
130131
printf(_(" [--retention-window=retention-window]\n"));
132+
printf(_(" [--wal-depth=wal-depth]\n"));
131133
printf(_(" [--compress]\n"));
132134
printf(_(" [--compress-algorithm=compress-algorithm]\n"));
133135
printf(_(" [--compress-level=compress-level]\n"));
@@ -186,6 +188,7 @@ help_pg_probackup(void)
186188
printf(_(" [-j num-threads] [--progress]\n"));
187189
printf(_(" [--retention-redundancy=retention-redundancy]\n"));
188190
printf(_(" [--retention-window=retention-window]\n"));
191+
printf(_(" [--wal-depth=wal-depth]\n"));
189192
printf(_(" [--delete-wal] [-i backup-id | --delete-expired | --merge-expired]\n"));
190193
printf(_(" [--dry-run]\n"));
191194
printf(_(" [--help]\n"));
@@ -263,6 +266,7 @@ help_backup(void)
263266
printf(_(" [--delete-expired] [--delete-wal] [--merge-expired]\n"));
264267
printf(_(" [--retention-redundancy=retention-redundancy]\n"));
265268
printf(_(" [--retention-window=retention-window]\n"));
269+
printf(_(" [--wal-depth=wal-depth]\n"));
266270
printf(_(" [--compress]\n"));
267271
printf(_(" [--compress-algorithm=compress-algorithm]\n"));
268272
printf(_(" [--compress-level=compress-level]\n"));
@@ -322,6 +326,8 @@ help_backup(void)
322326
printf(_(" number of full backups to keep; 0 disables; (default: 0)\n"));
323327
printf(_(" --retention-window=retention-window\n"));
324328
printf(_(" number of days of recoverability; 0 disables; (default: 0)\n"));
329+
printf(_(" --wal-depth=wal-depth number of latest valid backups per timeline that must\n"));
330+
printf(_(" retain the ability to perform PITR; 0 disables; (default: 0)\n"));
325331
printf(_(" --dry-run perform a trial run without any changes\n"));
326332

327333
printf(_("\n Pinning options:\n"));
@@ -591,7 +597,8 @@ help_delete(void)
591597
printf(_(" [-i backup-id | --delete-expired | --merge-expired] [--delete-wal]\n"));
592598
printf(_(" [-j num-threads] [--progress]\n"));
593599
printf(_(" [--retention-redundancy=retention-redundancy]\n"));
594-
printf(_(" [--retention-window=retention-window]\n\n"));
600+
printf(_(" [--retention-window=retention-window]\n"));
601+
printf(_(" [--wal-depth=wal-depth]\n\n"));
595602

596603
printf(_(" -B, --backup-path=backup-path location of the backup storage area\n"));
597604
printf(_(" --instance=instance_name name of the instance\n"));
@@ -609,6 +616,8 @@ help_delete(void)
609616
printf(_(" number of full backups to keep; 0 disables; (default: 0)\n"));
610617
printf(_(" --retention-window=retention-window\n"));
611618
printf(_(" number of days of recoverability; 0 disables; (default: 0)\n"));
619+
printf(_(" --wal-depth=wal-depth number of latest valid backups per timeline that must\n"));
620+
printf(_(" retain the ability to perform PITR; 0 disables; (default: 0)\n"));
612621
printf(_(" --dry-run perform a trial run without any changes\n"));
613622

614623
printf(_("\n Logging options:\n"));
@@ -704,6 +713,7 @@ help_set_config(void)
704713
printf(_(" [--log-rotation-age=log-rotation-age]\n"));
705714
printf(_(" [--retention-redundancy=retention-redundancy]\n"));
706715
printf(_(" [--retention-window=retention-window]\n"));
716+
printf(_(" [--wal-depth=wal-depth]\n"));
707717
printf(_(" [--compress-algorithm=compress-algorithm]\n"));
708718
printf(_(" [--compress-level=compress-level]\n"));
709719
printf(_(" [--archive-timeout=timeout]\n"));
@@ -746,6 +756,8 @@ help_set_config(void)
746756
printf(_(" number of full backups to keep; 0 disables; (default: 0)\n"));
747757
printf(_(" --retention-window=retention-window\n"));
748758
printf(_(" number of days of recoverability; 0 disables; (default: 0)\n"));
759+
printf(_(" --wal-depth=wal-depth number of latest valid backups with ability to perform\n"));
760+
printf(_(" the point in time recovery; disables; (default: 0)\n"));
749761

750762
printf(_("\n Compression options:\n"));
751763
printf(_(" --compress alias for --compress-algorithm='zlib' and --compress-level=1\n"));

tests/expected/option_help.out

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,20 @@ pg_probackup - utility to manage backup/recovery of PostgreSQL database.
1919
[--log-rotation-age=log-rotation-age]
2020
[--retention-redundancy=retention-redundancy]
2121
[--retention-window=retention-window]
22+
[--wal-depth=wal-depth]
2223
[--compress-algorithm=compress-algorithm]
2324
[--compress-level=compress-level]
2425
[--archive-timeout=timeout]
2526
[-d dbname] [-h host] [-p port] [-U username]
2627
[--remote-proto] [--remote-host]
2728
[--remote-port] [--remote-path] [--remote-user]
2829
[--ssh-options]
30+
[--restore-command=cmdline] [--archive-host=destination]
31+
[--archive-port=port] [--archive-user=username]
32+
[--help]
33+
34+
pg_probackup set-backup -B backup-path --instance=instance_name
35+
-i backup-id [--ttl] [--expire-time]
2936
[--help]
3037

3138
pg_probackup show-config -B backup-path --instance=instance_name
@@ -48,6 +55,7 @@ pg_probackup - utility to manage backup/recovery of PostgreSQL database.
4855
[--delete-expired] [--delete-wal] [--merge-expired]
4956
[--retention-redundancy=retention-redundancy]
5057
[--retention-window=retention-window]
58+
[--wal-depth=wal-depth]
5159
[--compress]
5260
[--compress-algorithm=compress-algorithm]
5361
[--compress-level=compress-level]
@@ -57,6 +65,7 @@ pg_probackup - utility to manage backup/recovery of PostgreSQL database.
5765
[--remote-proto] [--remote-host]
5866
[--remote-port] [--remote-path] [--remote-user]
5967
[--ssh-options]
68+
[--ttl] [--expire-time]
6069
[--help]
6170

6271
pg_probackup restore -B backup-path --instance=instance_name
@@ -71,11 +80,13 @@ pg_probackup - utility to manage backup/recovery of PostgreSQL database.
7180
[--no-validate] [--skip-block-validation]
7281
[-T OLDDIR=NEWDIR] [--progress]
7382
[--external-mapping=OLDDIR=NEWDIR]
74-
[--skip-external-dirs]
83+
[--skip-external-dirs] [--restore-command=cmdline]
7584
[--db-include | --db-exclude]
7685
[--remote-proto] [--remote-host]
7786
[--remote-port] [--remote-path] [--remote-user]
7887
[--ssh-options]
88+
[--archive-host=hostname]
89+
[--archive-port=port] [--archive-user=username]
7990
[--help]
8091

8192
pg_probackup validate -B backup-path [--instance=instance_name]
@@ -99,7 +110,11 @@ pg_probackup - utility to manage backup/recovery of PostgreSQL database.
99110
[--help]
100111

101112
pg_probackup delete -B backup-path --instance=instance_name
102-
[--wal] [-i backup-id | --expired | --merge-expired]
113+
[-j num-threads] [--progress]
114+
[--retention-redundancy=retention-redundancy]
115+
[--retention-window=retention-window]
116+
[--wal-depth=wal-depth]
117+
[--delete-wal] [-i backup-id | --delete-expired | --merge-expired]
103118
[--dry-run]
104119
[--help]
105120

0 commit comments

Comments
 (0)