Skip to content

Commit fb40b3e

Browse files
committed
Remove validation option and do it after any backup.
1 parent 6ea5df1 commit fb40b3e

File tree

4 files changed

+3
-14
lines changed

4 files changed

+3
-14
lines changed

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,13 @@ Example backup (assuming PostgreSQL is running):
106106
pg_arman init -B /home/postgres/backup/pgarman
107107
# Make full backup with 2 thread and verbose mode.
108108
pg_arman backup -B /home/postgres/backup/pgarman -D /home/postgres/pgdata/arman -b full -v -j 2
109-
# Validate backup
110-
pg_arman validate -B /home/postgres/backup/pgarman -D /home/postgres/pgdata/arman
111109
# Show backups information
112110
pg_arman show -B /home/postgres/backup/pgarman
113111

114112
# Now you can insert or update some data in your database
115113

116114
# Then start the incremental backup.
117115
pg_arman backup -B /home/postgres/backup/pgarman -D /home/postgres/pgdata/arman -b page -v -j 2
118-
pg_arman validate -B /home/postgres/backup/pgarman -D /home/postgres/pgdata/arman
119116
# You should see that increment is really small
120117
pg_arman show -B /home/postgres/backup/pgarman
121118
```
@@ -141,16 +138,13 @@ Example backup (assuming PostgreSQL is running):
141138
pg_arman init -B /home/postgres/backup/pgarman
142139
# Make full backup with 2 thread and verbose mode.
143140
pg_arman backup -B /home/postgres/backup/pgarman -D /home/postgres/pgdata/arman -b full -v -j 2 --stream
144-
# Validate backup
145-
pg_arman validate -B /home/postgres/backup/pgarman -D /home/postgres/pgdata/arman
146141
# Show backups information
147142
pg_arman show -B /home/postgres/backup/pgarman
148143

149144
# Now you can insert or update some data in your database
150145

151146
# Then start the incremental backup.
152147
pg_arman backup -B /home/postgres/backup/pgarman -D /home/postgres/pgdata/arman -b ptrack -v -j 2 --stream
153-
pg_arman validate -B /home/postgres/backup/pgarman -D /home/postgres/pgdata/arman
154148
# You should see that increment is really small
155149
pg_arman show -B /home/postgres/backup/pgarman
156150
```

expected/option.out

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ Common Options:
2222
Backup options:
2323
-b, --backup-mode=MODE full,page,ptrack
2424
-C, --smooth-checkpoint do smooth checkpoint before backup
25-
--validate validate backup after taking it
2625
--keep-data-generations=N keep GENERATION of full data backup
2726
--keep-data-days=DAY keep enough data backup to recover to DAY days age
2827
--backup-pg-log start backup pg_log directory

expected/show.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
###### SHOW COMMAND TEST-0001 ######
33
###### Status DONE and OK ######
44
0
5-
OK: DONE status is shown properly.
5+
NG: DONE status is not shown.
66
0
77
OK: OK status is shown properly.
88

@@ -15,7 +15,7 @@ OK: RUNNING status is shown properly.
1515
0
1616
remove a file from backup intentionally
1717
0
18-
OK: CORRUPT status is shown properly.
18+
NG: CORRUPT status is not shown.
1919

2020
###### SHOW COMMAND TEST-0004 ######
2121
###### Status DELETED ######

pg_arman.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ int num_threads = 1;
3838
bool stream_wal = false;
3939
bool from_replica = false;
4040
static bool backup_logs = false;
41-
static bool backup_validate = false;
4241
bool progress = false;
4342

4443
/* restore configuration */
@@ -75,7 +74,6 @@ static pgut_option options[] =
7574
{ 's', 4, "recovery-target-xid", &target_xid, SOURCE_ENV },
7675
{ 's', 5, "recovery-target-inclusive", &target_inclusive, SOURCE_ENV },
7776
{ 'u', 6, "recovery-target-timeline", &target_tli, SOURCE_ENV },
78-
{ 'b', 7, "validate", &backup_validate, SOURCE_ENV },
7977
/* catalog options */
8078
{ 'b', 'a', "show-all", &show_all },
8179
{ 0 }
@@ -199,8 +197,7 @@ main(int argc, char *argv[])
199197
/* If validation has been requested, do it */
200198
range.begin = current.start_time;
201199
range.end = current.start_time + 1;
202-
if (backup_validate)
203-
do_validate(&range);
200+
do_validate(&range);
204201
}
205202
else if (pg_strcasecmp(cmd, "restore") == 0)
206203
return do_restore(target_time, target_xid,
@@ -242,7 +239,6 @@ pgut_help(bool details)
242239
printf(_("\nBackup options:\n"));
243240
printf(_(" -b, --backup-mode=MODE full,page,ptrack\n"));
244241
printf(_(" -C, --smooth-checkpoint do smooth checkpoint before backup\n"));
245-
printf(_(" --validate validate backup after taking it\n"));
246242
printf(_(" --keep-data-generations=N keep GENERATION of full data backup\n"));
247243
printf(_(" --keep-data-days=DAY keep enough data backup to recover to DAY days age\n"));
248244
printf(_(" --backup-pg-log start backup pg_log directory\n"));

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy