1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-04-12 11:58:15 +02:00

Remove validation option and do it after any backup.

This commit is contained in:
stalkerg 2016-10-25 19:02:30 +03:00
parent 6ea5df1ca0
commit fb40b3e5a7
4 changed files with 3 additions and 14 deletions

View File

@ -106,8 +106,6 @@ Example backup (assuming PostgreSQL is running):
pg_arman init -B /home/postgres/backup/pgarman
# Make full backup with 2 thread and verbose mode.
pg_arman backup -B /home/postgres/backup/pgarman -D /home/postgres/pgdata/arman -b full -v -j 2
# Validate backup
pg_arman validate -B /home/postgres/backup/pgarman -D /home/postgres/pgdata/arman
# Show backups information
pg_arman show -B /home/postgres/backup/pgarman
@ -115,7 +113,6 @@ pg_arman show -B /home/postgres/backup/pgarman
# Then start the incremental backup.
pg_arman backup -B /home/postgres/backup/pgarman -D /home/postgres/pgdata/arman -b page -v -j 2
pg_arman validate -B /home/postgres/backup/pgarman -D /home/postgres/pgdata/arman
# You should see that increment is really small
pg_arman show -B /home/postgres/backup/pgarman
```
@ -141,8 +138,6 @@ Example backup (assuming PostgreSQL is running):
pg_arman init -B /home/postgres/backup/pgarman
# Make full backup with 2 thread and verbose mode.
pg_arman backup -B /home/postgres/backup/pgarman -D /home/postgres/pgdata/arman -b full -v -j 2 --stream
# Validate backup
pg_arman validate -B /home/postgres/backup/pgarman -D /home/postgres/pgdata/arman
# Show backups information
pg_arman show -B /home/postgres/backup/pgarman
@ -150,7 +145,6 @@ pg_arman show -B /home/postgres/backup/pgarman
# Then start the incremental backup.
pg_arman backup -B /home/postgres/backup/pgarman -D /home/postgres/pgdata/arman -b ptrack -v -j 2 --stream
pg_arman validate -B /home/postgres/backup/pgarman -D /home/postgres/pgdata/arman
# You should see that increment is really small
pg_arman show -B /home/postgres/backup/pgarman
```

View File

@ -22,7 +22,6 @@ Common Options:
Backup options:
-b, --backup-mode=MODE full,page,ptrack
-C, --smooth-checkpoint do smooth checkpoint before backup
--validate validate backup after taking it
--keep-data-generations=N keep GENERATION of full data backup
--keep-data-days=DAY keep enough data backup to recover to DAY days age
--backup-pg-log start backup pg_log directory

View File

@ -2,7 +2,7 @@
###### SHOW COMMAND TEST-0001 ######
###### Status DONE and OK ######
0
OK: DONE status is shown properly.
NG: DONE status is not shown.
0
OK: OK status is shown properly.
@ -15,7 +15,7 @@ OK: RUNNING status is shown properly.
0
remove a file from backup intentionally
0
OK: CORRUPT status is shown properly.
NG: CORRUPT status is not shown.
###### SHOW COMMAND TEST-0004 ######
###### Status DELETED ######

View File

@ -38,7 +38,6 @@ int num_threads = 1;
bool stream_wal = false;
bool from_replica = false;
static bool backup_logs = false;
static bool backup_validate = false;
bool progress = false;
/* restore configuration */
@ -75,7 +74,6 @@ static pgut_option options[] =
{ 's', 4, "recovery-target-xid", &target_xid, SOURCE_ENV },
{ 's', 5, "recovery-target-inclusive", &target_inclusive, SOURCE_ENV },
{ 'u', 6, "recovery-target-timeline", &target_tli, SOURCE_ENV },
{ 'b', 7, "validate", &backup_validate, SOURCE_ENV },
/* catalog options */
{ 'b', 'a', "show-all", &show_all },
{ 0 }
@ -199,8 +197,7 @@ main(int argc, char *argv[])
/* If validation has been requested, do it */
range.begin = current.start_time;
range.end = current.start_time + 1;
if (backup_validate)
do_validate(&range);
do_validate(&range);
}
else if (pg_strcasecmp(cmd, "restore") == 0)
return do_restore(target_time, target_xid,
@ -242,7 +239,6 @@ pgut_help(bool details)
printf(_("\nBackup options:\n"));
printf(_(" -b, --backup-mode=MODE full,page,ptrack\n"));
printf(_(" -C, --smooth-checkpoint do smooth checkpoint before backup\n"));
printf(_(" --validate validate backup after taking it\n"));
printf(_(" --keep-data-generations=N keep GENERATION of full data backup\n"));
printf(_(" --keep-data-days=DAY keep enough data backup to recover to DAY days age\n"));
printf(_(" --backup-pg-log start backup pg_log directory\n"));