From 095a9a0b831877b9b5d62b4b37da4caca0edb7df Mon Sep 17 00:00:00 2001 From: David Steele Date: Thu, 7 May 2015 10:29:30 -0600 Subject: [PATCH] Added resume setting to allow disabling resume feature. --- README.md | 13 ++++++- doc/doc.xml | 11 +++++- lib/BackRest/Backup.pm | 19 +++++++--- lib/BackRest/Config.pm | 16 +++++++- test/lib/BackRestTest/BackupTest.pm | 13 +++++++ test/log/backup-synthetic-001.log | 47 +++++++++++++++++++++++ test/log/backup-synthetic-002.log | 59 +++++++++++++++++++++++++++++ test/log/backup-synthetic-003.log | 47 +++++++++++++++++++++++ test/log/backup-synthetic-004.log | 59 +++++++++++++++++++++++++++++ test/log/backup-synthetic-005.log | 47 +++++++++++++++++++++++ test/log/backup-synthetic-006.log | 59 +++++++++++++++++++++++++++++ test/log/backup-synthetic-007.log | 47 +++++++++++++++++++++++ test/log/backup-synthetic-008.log | 59 +++++++++++++++++++++++++++++ 13 files changed, 487 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ae4fac9d5..b181be7ff 100644 --- a/README.md +++ b/README.md @@ -572,6 +572,15 @@ default: 1073741824 example: manifest-save-threshold=5368709120 ``` +##### `resume` key + +Defines whether the resume feature is enabled. Resume can greatly reduce the amount of time required to run a backup after a previous backup of the same type has failed. It adds complexity, however, so it may be desirable to disable in environments that do not require the feature. +``` +required: n +default: y +example: resume=false +``` + ##### `thread-max` key Defines the number of threads to use for backup or restore. Each thread will perform compression and transfer to make the backup run faster, but don't set `thread-max` so high that it impacts database performance during backup. @@ -709,7 +718,9 @@ example: db-path=/data/db ### v0.75: IN DEVELOPMENT: enterprise features: monitoring, throttling, retention period -* Asynchronous archive-get. This will make recovery much faster when restoring old backups with a lot of WAL replay or when a replica gets very far behind. +* Better resume support. Resumed files are checked to be sure they have not been modified and the manifest is saved more often to preserve checksums as the backup progresses. More unit tests to verify each resume case. + +* Resume is now optional. Use the `resume` setting or `--no-resume` from the command line to disable. ### v0.61: bug fix for uncompressed remote destination diff --git a/doc/doc.xml b/doc/doc.xml index e8c611934..c3c086f2d 100644 --- a/doc/doc.xml +++ b/doc/doc.xml @@ -534,6 +534,12 @@ Run a full backup on the db stanza. --type can 5368709120 + + + Defines whether the resume feature is enabled. Resume can greatly reduce the amount of time required to run a backup after a previous backup of the same type has failed. It adds complexity, however, so it may be desirable to disable in environments that do not require the feature. + false + + Defines the number of threads to use for backup or restore. Each thread will perform compression and transfer to make the backup run faster, but don't set thread-max so high that it impacts database performance during backup. @@ -666,7 +672,10 @@ Run a full backup on the db stanza. --type can - Asynchronous archive-get. This will make recovery much faster when restoring old backups with a lot of WAL replay or when a replica gets very far behind. + Better resume support. Resumed files are checked to be sure they have not been modified and the manifest is saved more often to preserve checksums as the backup progresses. More unit tests to verify each resume case. + + + Resume is now optional. Use the resume setting or --no-resume from the command line to disable. diff --git a/lib/BackRest/Backup.pm b/lib/BackRest/Backup.pm index 697ce5244..54fa8d7db 100644 --- a/lib/BackRest/Backup.pm +++ b/lib/BackRest/Backup.pm @@ -702,7 +702,7 @@ sub backup }; # If the aborted backup is usable then clean it - if ($bUsable) + if ($bUsable && optionGet(OPTION_RESUME)) { &log(WARN, 'aborted backup of same type exists, will be cleaned to remove invalid files and resumed'); &log(TEST, TEST_BACKUP_RESUME); @@ -713,17 +713,24 @@ sub backup # Else remove it else { - my $strReason = "new version '${strVersion}' does not match aborted version '${strVersion}'"; + my $strReason = "resume is disabled"; - if ($strVersion eq $strAbortedVersion) + if (optionGet(OPTION_RESUME)) { - if ($strType ne $strAbortedType) + if ($strVersion eq $strAbortedVersion) { - $strReason = "new type '${strType}' does not match aborted type '${strAbortedType}'"; + if ($strType ne $strAbortedType) + { + $strReason = "new type '${strType}' does not match aborted type '${strAbortedType}'"; + } + else + { + $strReason = "new prior '${strPrior}' does not match aborted prior '${strAbortedPrior}'"; + } } else { - $strReason = "new prior '${strPrior}' does not match aborted prior '${strAbortedPrior}'"; + $strReason = "new version '${strVersion}' does not match aborted version '${strVersion}'"; } } diff --git a/lib/BackRest/Config.pm b/lib/BackRest/Config.pm index b88c43781..e54c53532 100644 --- a/lib/BackRest/Config.pm +++ b/lib/BackRest/Config.pm @@ -150,6 +150,7 @@ use constant OPTION_BACKUP_USER => 'backup-user', OPTION_HARDLINK => 'hardlink', OPTION_MANIFEST_SAVE_THRESHOLD => 'manifest-save-threshold', + OPTION_RESUME => 'resume', OPTION_START_FAST => 'start-fast', # COMMAND Section @@ -192,7 +193,8 @@ push @EXPORT, qw(OPTION_CONFIG OPTION_DELTA OPTION_FORCE OPTION_NO_START_STOP OP OPTION_DB_HOST OPTION_BACKUP_HOST OPTION_ARCHIVE_MAX_MB OPTION_BACKUP_ARCHIVE_CHECK OPTION_BACKUP_ARCHIVE_COPY OPTION_ARCHIVE_ASYNC OPTION_BUFFER_SIZE OPTION_COMPRESS OPTION_COMPRESS_LEVEL OPTION_COMPRESS_LEVEL_NETWORK OPTION_HARDLINK - OPTION_MANIFEST_SAVE_THRESHOLD OPTION_PATH_ARCHIVE OPTION_REPO_PATH OPTION_REPO_REMOTE_PATH OPTION_DB_PATH + OPTION_MANIFEST_SAVE_THRESHOLD OPTION_RESUME OPTION_PATH_ARCHIVE OPTION_REPO_PATH OPTION_REPO_REMOTE_PATH + OPTION_DB_PATH OPTION_LOG_LEVEL_CONSOLE OPTION_LOG_LEVEL_FILE OPTION_RESTORE_RECOVERY_SETTING OPTION_RETENTION_ARCHIVE OPTION_RETENTION_ARCHIVE_TYPE OPTION_RETENTION_FULL OPTION_RETENTION_DIFF OPTION_START_FAST OPTION_THREAD_MAX OPTION_THREAD_TIMEOUT @@ -234,6 +236,7 @@ use constant OPTION_DEFAULT_BACKUP_HARDLINK => false, OPTION_DEFAULT_BACKUP_NO_START_STOP => false, OPTION_DEFAULT_BACKUP_MANIFEST_SAVE_THRESHOLD => 1073741824, + OPTION_DEFAULT_BACKUP_RESUME => true, OPTION_DEFAULT_BACKUP_START_FAST => false, OPTION_DEFAULT_BACKUP_TYPE => BACKUP_TYPE_INCR, @@ -902,6 +905,17 @@ my %oOptionRule = } }, + &OPTION_RESUME => + { + &OPTION_RULE_TYPE => OPTION_TYPE_BOOLEAN, + &OPTION_RULE_DEFAULT => OPTION_DEFAULT_BACKUP_RESUME, + &OPTION_RULE_SECTION => true, + &OPTION_RULE_OPERATION => + { + &OP_BACKUP => true + } + }, + &OPTION_START_FAST => { &OPTION_RULE_TYPE => OPTION_TYPE_BOOLEAN, diff --git a/test/lib/BackRestTest/BackupTest.pm b/test/lib/BackRestTest/BackupTest.pm index e2c7012c2..1ab171cd1 100755 --- a/test/lib/BackRestTest/BackupTest.pm +++ b/test/lib/BackRestTest/BackupTest.pm @@ -2058,6 +2058,19 @@ sub BackRestTestBackup_Test $strBackup = BackRestTestBackup_BackupSynthetic($strType, $strStanza, $bRemote, $oFile, \%oManifest, 'cannot resume - new diff', TEST_BACKUP_NORESUME); + # Resume Diff Backup + #----------------------------------------------------------------------------------------------------------------------- + $strType = 'diff'; + + $strTmpPath = BackRestTestCommon_RepoPathGet() . "/temp/${strStanza}.tmp"; + + BackRestTestCommon_PathMove(BackRestTestCommon_RepoPathGet() . "/backup/${strStanza}/${strBackup}", + $strTmpPath, $bRemote); + + $strBackup = BackRestTestBackup_BackupSynthetic($strType, $strStanza, $bRemote, $oFile, \%oManifest, + 'cannot resume - disabled', TEST_BACKUP_NORESUME, undef, undef, + '--no-resume'); + # Restore - #----------------------------------------------------------------------------------------------------------------------- $bDelta = false; diff --git a/test/log/backup-synthetic-001.log b/test/log/backup-synthetic-001.log index c90125179..9a169b825 100644 --- a/test/log/backup-synthetic-001.log +++ b/test/log/backup-synthetic-001.log @@ -237,6 +237,53 @@ diff backup (cannot resume - new diff) INFO: archive rentention type not set - archive logs will not be expired DEBUG: safe exit called, terminating threads +diff backup (cannot resume - disabled) +> [BACKREST_BIN_PATH]/pg_backrest.pl --config=[TEST_PATH]/db/pg_backrest.conf --no-start-stop --no-resume --type=diff --stanza=db backup --test --test-delay=0 +------------------------------------------------------------------------------------------------------------------------------------ + DEBUG: cluster path is [TEST_PATH]/db/common + DEBUG: File->path_create: backup:cluster:[TEST_PATH]/backrest/backup/db, mode [undef] + DEBUG: File->exists: backup:cluster:[TEST_PATH]/backrest/backup/db + DEBUG: backup_regexp_get(1, 0, 0): ^[0-9]{8}\-[0-9]{6}F$ + DEBUG: File->list: backup:cluster:[TEST_PATH]/backrest/backup/db, expression ^[0-9]{8}\-[0-9]{6}F$, sort reverse + INFO: last backup label = [BACKUP_LABEL], version = [VERSION] + DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/postmaster.pid + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common/pg_tblspc + DEBUG: Found tablespace 1 + DEBUG: Found tablespace 2 + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/tablespace/ts1 + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/tablespace/ts2 + DEBUG: File->wait: db:absolute + WARN: aborted backup exists, but cannot be resumed (resume is disabled) - will be dropped and recreated + DEBUG: File->path_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp, mode [undef] + DEBUG: File->copy: local db:absolute:[TEST_PATH]/db/common/badchecksum.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/badchecksum.txt, source_compressed = false, destination_compress = false, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/base/badchecksum.txt, destination_path_create = true + DEBUG: File->path_create: absolute:[TEST_PATH]/backrest/temp/db.tmp/base, mode [undef] + DEBUG: File->exists: absolute:[TEST_PATH]/backrest/temp/db.tmp/base + INFO: backup file [TEST_PATH]/db/common/badchecksum.txt (11B, 44%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51 + DEBUG: File->copy: local db:absolute:[TEST_PATH]/db/tablespace/ts1/tablespace1.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1/tablespace1.txt, source_compressed = false, destination_compress = false, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1/tablespace1.txt, destination_path_create = true + DEBUG: File->path_create: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1, mode [undef] + DEBUG: File->exists: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1 + INFO: backup file [TEST_PATH]/db/tablespace/ts1/tablespace1.txt (7B, 72%) checksum d85de07d6421d90aa9191c11c889bfde43680f0f + DEBUG: File->copy: local db:absolute:[TEST_PATH]/db/tablespace/ts2/tablespace2.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2/tablespace2.txt, source_compressed = false, destination_compress = false, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2/tablespace2.txt, destination_path_create = true + DEBUG: File->path_create: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2, mode [undef] + DEBUG: File->exists: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2 + INFO: backup file [TEST_PATH]/db/tablespace/ts2/tablespace2.txt (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578 + INFO: 25B total backup + INFO: new backup label: [BACKUP_LABEL] + DEBUG: moving [TEST_PATH]/backrest/temp/db.tmp to [TEST_PATH]/backrest/backup/db/[BACKUP_LABEL] + DEBUG: File->move: backup:tmp to backup:cluster:[BACKUP_LABEL], destination_path_create = false + DEBUG: File->remove: backup:cluster:[TEST_PATH]/backrest/backup/db/latest + DEBUG: File->link_create: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL] to backup:cluster:[TEST_PATH]/backrest/backup/db/latest, hard = false, relative = true, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef] + INFO: archive rentention type not set - archive logs will not be expired + DEBUG: safe exit called, terminating threads + restore, backup '[BACKUP_LABEL]', expect exit 115 (fail on used path) > [BACKREST_BIN_PATH]/pg_backrest.pl --config=[TEST_PATH]/db/pg_backrest.conf --set=[BACKUP_LABEL] --stanza=db restore ------------------------------------------------------------------------------------------------------------------------------------ diff --git a/test/log/backup-synthetic-002.log b/test/log/backup-synthetic-002.log index 7bbec4ec7..ec7d37348 100644 --- a/test/log/backup-synthetic-002.log +++ b/test/log/backup-synthetic-002.log @@ -276,6 +276,65 @@ diff backup (cannot resume - new diff) INFO: archive rentention type not set - archive logs will not be expired DEBUG: safe exit called, terminating threads +diff backup (cannot resume - disabled) +> [BACKREST_BIN_PATH]/pg_backrest.pl --config=[TEST_PATH]/db/pg_backrest.conf --no-start-stop --no-resume --type=diff --stanza=db backup --test --test-delay=0 +------------------------------------------------------------------------------------------------------------------------------------ + DEBUG: cluster path is [TEST_PATH]/db/common + DEBUG: File->path_create: backup:cluster:[TEST_PATH]/backrest/backup/db, mode [undef] + DEBUG: File->exists: backup:cluster:[TEST_PATH]/backrest/backup/db + DEBUG: backup_regexp_get(1, 0, 0): ^[0-9]{8}\-[0-9]{6}F$ + DEBUG: File->list: backup:cluster:[TEST_PATH]/backrest/backup/db, expression ^[0-9]{8}\-[0-9]{6}F$, sort reverse + INFO: last backup label = [BACKUP_LABEL], version = [VERSION] + DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/postmaster.pid + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common/pg_tblspc + DEBUG: Found tablespace 1 + DEBUG: Found tablespace 2 + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/tablespace/ts1 + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/tablespace/ts2 + DEBUG: File->wait: db:absolute + WARN: aborted backup exists, but cannot be resumed (resume is disabled) - will be dropped and recreated + DEBUG: File->path_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp, mode [undef] + DEBUG: File->path_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/base, mode [undef] + DEBUG: File->path_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/path-test, mode [undef] + DEBUG: File->path_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/pg_tblspc, mode [undef] + DEBUG: File->link_create: backup:absolute:/test to backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/link-test, hard = false, relative = false, destination_path_create = false + DEBUG: hard-linking [TEST_PATH]/db/common/PG_VERSION from [BACKUP_LABEL] + DEBUG: File->link_create: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/PG_VERSION to backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/PG_VERSION, hard = true, relative = false, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/temp/db.tmp/base, mode [undef] + DEBUG: hard-linking [TEST_PATH]/db/common/base/base1.txt from [BACKUP_LABEL] + DEBUG: File->link_create: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/base/base1.txt to backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/base/base1.txt, hard = true, relative = false, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/temp/db.tmp/base/base, mode [undef] + DEBUG: File->link_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1 to backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/pg_tblspc/1, hard = false, relative = true, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/temp/db.tmp/base/pg_tblspc, mode [undef] + DEBUG: File->link_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2 to backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/pg_tblspc/2, hard = false, relative = true, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/temp/db.tmp/base/pg_tblspc, mode [undef] + DEBUG: File->copy: local db:absolute:[TEST_PATH]/db/common/badchecksum.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/badchecksum.txt, source_compressed = false, destination_compress = false, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/base/badchecksum.txt, destination_path_create = true + INFO: backup file [TEST_PATH]/db/common/badchecksum.txt (11B, 44%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51 + DEBUG: File->copy: local db:absolute:[TEST_PATH]/db/tablespace/ts1/tablespace1.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1/tablespace1.txt, source_compressed = false, destination_compress = false, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1/tablespace1.txt, destination_path_create = true + DEBUG: File->path_create: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1, mode [undef] + DEBUG: File->exists: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1 + INFO: backup file [TEST_PATH]/db/tablespace/ts1/tablespace1.txt (7B, 72%) checksum d85de07d6421d90aa9191c11c889bfde43680f0f + DEBUG: File->copy: local db:absolute:[TEST_PATH]/db/tablespace/ts2/tablespace2.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2/tablespace2.txt, source_compressed = false, destination_compress = false, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2/tablespace2.txt, destination_path_create = true + DEBUG: File->path_create: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2, mode [undef] + DEBUG: File->exists: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2 + INFO: backup file [TEST_PATH]/db/tablespace/ts2/tablespace2.txt (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578 + INFO: 25B total backup + INFO: new backup label: [BACKUP_LABEL] + DEBUG: moving [TEST_PATH]/backrest/temp/db.tmp to [TEST_PATH]/backrest/backup/db/[BACKUP_LABEL] + DEBUG: File->move: backup:tmp to backup:cluster:[BACKUP_LABEL], destination_path_create = false + DEBUG: File->remove: backup:cluster:[TEST_PATH]/backrest/backup/db/latest + DEBUG: File->link_create: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL] to backup:cluster:[TEST_PATH]/backrest/backup/db/latest, hard = false, relative = true, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef] + INFO: archive rentention type not set - archive logs will not be expired + DEBUG: safe exit called, terminating threads + restore, backup '[BACKUP_LABEL]', expect exit 115 (fail on used path) > [BACKREST_BIN_PATH]/pg_backrest.pl --config=[TEST_PATH]/db/pg_backrest.conf --set=[BACKUP_LABEL] --stanza=db restore ------------------------------------------------------------------------------------------------------------------------------------ diff --git a/test/log/backup-synthetic-003.log b/test/log/backup-synthetic-003.log index 1324d8c7f..769b9ea5e 100644 --- a/test/log/backup-synthetic-003.log +++ b/test/log/backup-synthetic-003.log @@ -240,6 +240,53 @@ diff backup (cannot resume - new diff) INFO: archive rentention type not set - archive logs will not be expired DEBUG: safe exit called, terminating threads +diff backup (cannot resume - disabled) +> [BACKREST_BIN_PATH]/pg_backrest.pl --config=[TEST_PATH]/db/pg_backrest.conf --no-start-stop --no-resume --type=diff --stanza=db backup --test --test-delay=0 +------------------------------------------------------------------------------------------------------------------------------------ + DEBUG: cluster path is [TEST_PATH]/db/common + DEBUG: File->path_create: backup:cluster:[TEST_PATH]/backrest/backup/db, mode [undef] + DEBUG: File->exists: backup:cluster:[TEST_PATH]/backrest/backup/db + DEBUG: backup_regexp_get(1, 0, 0): ^[0-9]{8}\-[0-9]{6}F$ + DEBUG: File->list: backup:cluster:[TEST_PATH]/backrest/backup/db, expression ^[0-9]{8}\-[0-9]{6}F$, sort reverse + INFO: last backup label = [BACKUP_LABEL], version = [VERSION] + DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/postmaster.pid + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common/pg_tblspc + DEBUG: Found tablespace 1 + DEBUG: Found tablespace 2 + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/tablespace/ts1 + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/tablespace/ts2 + DEBUG: File->wait: db:absolute + WARN: aborted backup exists, but cannot be resumed (resume is disabled) - will be dropped and recreated + DEBUG: File->path_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp, mode [undef] + DEBUG: File->copy: local db:absolute:[TEST_PATH]/db/common/badchecksum.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/badchecksum.txt.gz, source_compressed = false, destination_compress = true, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/base/badchecksum.txt.gz, destination_path_create = true + DEBUG: File->path_create: absolute:[TEST_PATH]/backrest/temp/db.tmp/base, mode [undef] + DEBUG: File->exists: absolute:[TEST_PATH]/backrest/temp/db.tmp/base + INFO: backup file [TEST_PATH]/db/common/badchecksum.txt (11B, 44%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51 + DEBUG: File->copy: local db:absolute:[TEST_PATH]/db/tablespace/ts1/tablespace1.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1/tablespace1.txt.gz, source_compressed = false, destination_compress = true, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1/tablespace1.txt.gz, destination_path_create = true + DEBUG: File->path_create: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1, mode [undef] + DEBUG: File->exists: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1 + INFO: backup file [TEST_PATH]/db/tablespace/ts1/tablespace1.txt (7B, 72%) checksum d85de07d6421d90aa9191c11c889bfde43680f0f + DEBUG: File->copy: local db:absolute:[TEST_PATH]/db/tablespace/ts2/tablespace2.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2/tablespace2.txt.gz, source_compressed = false, destination_compress = true, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2/tablespace2.txt.gz, destination_path_create = true + DEBUG: File->path_create: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2, mode [undef] + DEBUG: File->exists: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2 + INFO: backup file [TEST_PATH]/db/tablespace/ts2/tablespace2.txt (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578 + INFO: 25B total backup + INFO: new backup label: [BACKUP_LABEL] + DEBUG: moving [TEST_PATH]/backrest/temp/db.tmp to [TEST_PATH]/backrest/backup/db/[BACKUP_LABEL] + DEBUG: File->move: backup:tmp to backup:cluster:[BACKUP_LABEL], destination_path_create = false + DEBUG: File->remove: backup:cluster:[TEST_PATH]/backrest/backup/db/latest + DEBUG: File->link_create: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL] to backup:cluster:[TEST_PATH]/backrest/backup/db/latest, hard = false, relative = true, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef] + INFO: archive rentention type not set - archive logs will not be expired + DEBUG: safe exit called, terminating threads + restore, backup '[BACKUP_LABEL]', expect exit 115 (fail on used path) > [BACKREST_BIN_PATH]/pg_backrest.pl --config=[TEST_PATH]/db/pg_backrest.conf --set=[BACKUP_LABEL] --stanza=db restore ------------------------------------------------------------------------------------------------------------------------------------ diff --git a/test/log/backup-synthetic-004.log b/test/log/backup-synthetic-004.log index e6203e3bf..b37a7b813 100644 --- a/test/log/backup-synthetic-004.log +++ b/test/log/backup-synthetic-004.log @@ -279,6 +279,65 @@ diff backup (cannot resume - new diff) INFO: archive rentention type not set - archive logs will not be expired DEBUG: safe exit called, terminating threads +diff backup (cannot resume - disabled) +> [BACKREST_BIN_PATH]/pg_backrest.pl --config=[TEST_PATH]/db/pg_backrest.conf --no-start-stop --no-resume --type=diff --stanza=db backup --test --test-delay=0 +------------------------------------------------------------------------------------------------------------------------------------ + DEBUG: cluster path is [TEST_PATH]/db/common + DEBUG: File->path_create: backup:cluster:[TEST_PATH]/backrest/backup/db, mode [undef] + DEBUG: File->exists: backup:cluster:[TEST_PATH]/backrest/backup/db + DEBUG: backup_regexp_get(1, 0, 0): ^[0-9]{8}\-[0-9]{6}F$ + DEBUG: File->list: backup:cluster:[TEST_PATH]/backrest/backup/db, expression ^[0-9]{8}\-[0-9]{6}F$, sort reverse + INFO: last backup label = [BACKUP_LABEL], version = [VERSION] + DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/postmaster.pid + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common/pg_tblspc + DEBUG: Found tablespace 1 + DEBUG: Found tablespace 2 + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/tablespace/ts1 + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/tablespace/ts2 + DEBUG: File->wait: db:absolute + WARN: aborted backup exists, but cannot be resumed (resume is disabled) - will be dropped and recreated + DEBUG: File->path_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp, mode [undef] + DEBUG: File->path_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/base, mode [undef] + DEBUG: File->path_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/path-test, mode [undef] + DEBUG: File->path_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/pg_tblspc, mode [undef] + DEBUG: File->link_create: backup:absolute:/test to backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/link-test, hard = false, relative = false, destination_path_create = false + DEBUG: hard-linking [TEST_PATH]/db/common/PG_VERSION from [BACKUP_LABEL] + DEBUG: File->link_create: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/PG_VERSION to backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/PG_VERSION, hard = true, relative = false, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/temp/db.tmp/base, mode [undef] + DEBUG: hard-linking [TEST_PATH]/db/common/base/base1.txt from [BACKUP_LABEL] + DEBUG: File->link_create: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/base/base1.txt to backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/base/base1.txt, hard = true, relative = false, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/temp/db.tmp/base/base, mode [undef] + DEBUG: File->link_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1 to backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/pg_tblspc/1, hard = false, relative = true, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/temp/db.tmp/base/pg_tblspc, mode [undef] + DEBUG: File->link_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2 to backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/pg_tblspc/2, hard = false, relative = true, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/temp/db.tmp/base/pg_tblspc, mode [undef] + DEBUG: File->copy: local db:absolute:[TEST_PATH]/db/common/badchecksum.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/badchecksum.txt.gz, source_compressed = false, destination_compress = true, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/base/badchecksum.txt.gz, destination_path_create = true + INFO: backup file [TEST_PATH]/db/common/badchecksum.txt (11B, 44%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51 + DEBUG: File->copy: local db:absolute:[TEST_PATH]/db/tablespace/ts1/tablespace1.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1/tablespace1.txt.gz, source_compressed = false, destination_compress = true, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1/tablespace1.txt.gz, destination_path_create = true + DEBUG: File->path_create: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1, mode [undef] + DEBUG: File->exists: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1 + INFO: backup file [TEST_PATH]/db/tablespace/ts1/tablespace1.txt (7B, 72%) checksum d85de07d6421d90aa9191c11c889bfde43680f0f + DEBUG: File->copy: local db:absolute:[TEST_PATH]/db/tablespace/ts2/tablespace2.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2/tablespace2.txt.gz, source_compressed = false, destination_compress = true, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2/tablespace2.txt.gz, destination_path_create = true + DEBUG: File->path_create: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2, mode [undef] + DEBUG: File->exists: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2 + INFO: backup file [TEST_PATH]/db/tablespace/ts2/tablespace2.txt (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578 + INFO: 25B total backup + INFO: new backup label: [BACKUP_LABEL] + DEBUG: moving [TEST_PATH]/backrest/temp/db.tmp to [TEST_PATH]/backrest/backup/db/[BACKUP_LABEL] + DEBUG: File->move: backup:tmp to backup:cluster:[BACKUP_LABEL], destination_path_create = false + DEBUG: File->remove: backup:cluster:[TEST_PATH]/backrest/backup/db/latest + DEBUG: File->link_create: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL] to backup:cluster:[TEST_PATH]/backrest/backup/db/latest, hard = false, relative = true, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef] + INFO: archive rentention type not set - archive logs will not be expired + DEBUG: safe exit called, terminating threads + restore, backup '[BACKUP_LABEL]', expect exit 115 (fail on used path) > [BACKREST_BIN_PATH]/pg_backrest.pl --config=[TEST_PATH]/db/pg_backrest.conf --set=[BACKUP_LABEL] --stanza=db restore ------------------------------------------------------------------------------------------------------------------------------------ diff --git a/test/log/backup-synthetic-005.log b/test/log/backup-synthetic-005.log index 2f9db3a83..d6d4e7a00 100644 --- a/test/log/backup-synthetic-005.log +++ b/test/log/backup-synthetic-005.log @@ -237,6 +237,53 @@ diff backup (cannot resume - new diff) INFO: archive rentention type not set - archive logs will not be expired DEBUG: safe exit called, terminating threads +diff backup (cannot resume - disabled) +> [BACKREST_BIN_PATH]/pg_backrest.pl --config=[TEST_PATH]/backrest/pg_backrest.conf --no-start-stop --no-resume --type=diff --stanza=db backup --test --test-delay=0 +------------------------------------------------------------------------------------------------------------------------------------ + DEBUG: cluster path is [TEST_PATH]/db/common + DEBUG: File->path_create: backup:cluster:[TEST_PATH]/backrest/backup/db, mode [undef] + DEBUG: File->exists: backup:cluster:[TEST_PATH]/backrest/backup/db + DEBUG: backup_regexp_get(1, 0, 0): ^[0-9]{8}\-[0-9]{6}F$ + DEBUG: File->list: backup:cluster:[TEST_PATH]/backrest/backup/db, expression ^[0-9]{8}\-[0-9]{6}F$, sort reverse + INFO: last backup label = [BACKUP_LABEL], version = [VERSION] + DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/postmaster.pid + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common/pg_tblspc + DEBUG: Found tablespace 1 + DEBUG: Found tablespace 2 + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/tablespace/ts1 + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/tablespace/ts2 + DEBUG: File->wait: db:absolute + WARN: aborted backup exists, but cannot be resumed (resume is disabled) - will be dropped and recreated + DEBUG: File->path_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp, mode [undef] + DEBUG: File->copy: remote db:absolute:[TEST_PATH]/db/common/badchecksum.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/badchecksum.txt, source_compressed = false, destination_compress = false, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/base/badchecksum.txt, destination_path_create = true + DEBUG: File->path_create: absolute:[TEST_PATH]/backrest/temp/db.tmp/base, mode [undef] + DEBUG: File->exists: absolute:[TEST_PATH]/backrest/temp/db.tmp/base + INFO: backup file [TEST_PATH]/db/common/badchecksum.txt (11B, 44%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51 + DEBUG: File->copy: remote db:absolute:[TEST_PATH]/db/tablespace/ts1/tablespace1.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1/tablespace1.txt, source_compressed = false, destination_compress = false, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1/tablespace1.txt, destination_path_create = true + DEBUG: File->path_create: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1, mode [undef] + DEBUG: File->exists: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1 + INFO: backup file [TEST_PATH]/db/tablespace/ts1/tablespace1.txt (7B, 72%) checksum d85de07d6421d90aa9191c11c889bfde43680f0f + DEBUG: File->copy: remote db:absolute:[TEST_PATH]/db/tablespace/ts2/tablespace2.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2/tablespace2.txt, source_compressed = false, destination_compress = false, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2/tablespace2.txt, destination_path_create = true + DEBUG: File->path_create: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2, mode [undef] + DEBUG: File->exists: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2 + INFO: backup file [TEST_PATH]/db/tablespace/ts2/tablespace2.txt (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578 + INFO: 25B total backup + INFO: new backup label: [BACKUP_LABEL] + DEBUG: moving [TEST_PATH]/backrest/temp/db.tmp to [TEST_PATH]/backrest/backup/db/[BACKUP_LABEL] + DEBUG: File->move: backup:tmp to backup:cluster:[BACKUP_LABEL], destination_path_create = false + DEBUG: File->remove: backup:cluster:[TEST_PATH]/backrest/backup/db/latest + DEBUG: File->link_create: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL] to backup:cluster:[TEST_PATH]/backrest/backup/db/latest, hard = false, relative = true, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef] + INFO: archive rentention type not set - archive logs will not be expired + DEBUG: safe exit called, terminating threads + restore, backup '[BACKUP_LABEL]', expect exit 115 (fail on used path) > [BACKREST_BIN_PATH]/pg_backrest.pl --config=[TEST_PATH]/db/pg_backrest.conf --set=[BACKUP_LABEL] --stanza=db restore ------------------------------------------------------------------------------------------------------------------------------------ diff --git a/test/log/backup-synthetic-006.log b/test/log/backup-synthetic-006.log index 1048f3494..723c91194 100644 --- a/test/log/backup-synthetic-006.log +++ b/test/log/backup-synthetic-006.log @@ -276,6 +276,65 @@ diff backup (cannot resume - new diff) INFO: archive rentention type not set - archive logs will not be expired DEBUG: safe exit called, terminating threads +diff backup (cannot resume - disabled) +> [BACKREST_BIN_PATH]/pg_backrest.pl --config=[TEST_PATH]/backrest/pg_backrest.conf --no-start-stop --no-resume --type=diff --stanza=db backup --test --test-delay=0 +------------------------------------------------------------------------------------------------------------------------------------ + DEBUG: cluster path is [TEST_PATH]/db/common + DEBUG: File->path_create: backup:cluster:[TEST_PATH]/backrest/backup/db, mode [undef] + DEBUG: File->exists: backup:cluster:[TEST_PATH]/backrest/backup/db + DEBUG: backup_regexp_get(1, 0, 0): ^[0-9]{8}\-[0-9]{6}F$ + DEBUG: File->list: backup:cluster:[TEST_PATH]/backrest/backup/db, expression ^[0-9]{8}\-[0-9]{6}F$, sort reverse + INFO: last backup label = [BACKUP_LABEL], version = [VERSION] + DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/postmaster.pid + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common/pg_tblspc + DEBUG: Found tablespace 1 + DEBUG: Found tablespace 2 + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/tablespace/ts1 + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/tablespace/ts2 + DEBUG: File->wait: db:absolute + WARN: aborted backup exists, but cannot be resumed (resume is disabled) - will be dropped and recreated + DEBUG: File->path_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp, mode [undef] + DEBUG: File->path_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/base, mode [undef] + DEBUG: File->path_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/path-test, mode [undef] + DEBUG: File->path_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/pg_tblspc, mode [undef] + DEBUG: File->link_create: backup:absolute:/test to backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/link-test, hard = false, relative = false, destination_path_create = false + DEBUG: hard-linking [TEST_PATH]/db/common/PG_VERSION from [BACKUP_LABEL] + DEBUG: File->link_create: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/PG_VERSION to backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/PG_VERSION, hard = true, relative = false, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/temp/db.tmp/base, mode [undef] + DEBUG: hard-linking [TEST_PATH]/db/common/base/base1.txt from [BACKUP_LABEL] + DEBUG: File->link_create: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/base/base1.txt to backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/base/base1.txt, hard = true, relative = false, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/temp/db.tmp/base/base, mode [undef] + DEBUG: File->link_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1 to backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/pg_tblspc/1, hard = false, relative = true, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/temp/db.tmp/base/pg_tblspc, mode [undef] + DEBUG: File->link_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2 to backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/pg_tblspc/2, hard = false, relative = true, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/temp/db.tmp/base/pg_tblspc, mode [undef] + DEBUG: File->copy: remote db:absolute:[TEST_PATH]/db/common/badchecksum.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/badchecksum.txt, source_compressed = false, destination_compress = false, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/base/badchecksum.txt, destination_path_create = true + INFO: backup file [TEST_PATH]/db/common/badchecksum.txt (11B, 44%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51 + DEBUG: File->copy: remote db:absolute:[TEST_PATH]/db/tablespace/ts1/tablespace1.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1/tablespace1.txt, source_compressed = false, destination_compress = false, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1/tablespace1.txt, destination_path_create = true + DEBUG: File->path_create: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1, mode [undef] + DEBUG: File->exists: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1 + INFO: backup file [TEST_PATH]/db/tablespace/ts1/tablespace1.txt (7B, 72%) checksum d85de07d6421d90aa9191c11c889bfde43680f0f + DEBUG: File->copy: remote db:absolute:[TEST_PATH]/db/tablespace/ts2/tablespace2.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2/tablespace2.txt, source_compressed = false, destination_compress = false, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2/tablespace2.txt, destination_path_create = true + DEBUG: File->path_create: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2, mode [undef] + DEBUG: File->exists: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2 + INFO: backup file [TEST_PATH]/db/tablespace/ts2/tablespace2.txt (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578 + INFO: 25B total backup + INFO: new backup label: [BACKUP_LABEL] + DEBUG: moving [TEST_PATH]/backrest/temp/db.tmp to [TEST_PATH]/backrest/backup/db/[BACKUP_LABEL] + DEBUG: File->move: backup:tmp to backup:cluster:[BACKUP_LABEL], destination_path_create = false + DEBUG: File->remove: backup:cluster:[TEST_PATH]/backrest/backup/db/latest + DEBUG: File->link_create: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL] to backup:cluster:[TEST_PATH]/backrest/backup/db/latest, hard = false, relative = true, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef] + INFO: archive rentention type not set - archive logs will not be expired + DEBUG: safe exit called, terminating threads + restore, backup '[BACKUP_LABEL]', expect exit 115 (fail on used path) > [BACKREST_BIN_PATH]/pg_backrest.pl --config=[TEST_PATH]/db/pg_backrest.conf --set=[BACKUP_LABEL] --stanza=db restore ------------------------------------------------------------------------------------------------------------------------------------ diff --git a/test/log/backup-synthetic-007.log b/test/log/backup-synthetic-007.log index e6d031ff1..7a3abb43e 100644 --- a/test/log/backup-synthetic-007.log +++ b/test/log/backup-synthetic-007.log @@ -240,6 +240,53 @@ diff backup (cannot resume - new diff) INFO: archive rentention type not set - archive logs will not be expired DEBUG: safe exit called, terminating threads +diff backup (cannot resume - disabled) +> [BACKREST_BIN_PATH]/pg_backrest.pl --config=[TEST_PATH]/backrest/pg_backrest.conf --no-start-stop --no-resume --type=diff --stanza=db backup --test --test-delay=0 +------------------------------------------------------------------------------------------------------------------------------------ + DEBUG: cluster path is [TEST_PATH]/db/common + DEBUG: File->path_create: backup:cluster:[TEST_PATH]/backrest/backup/db, mode [undef] + DEBUG: File->exists: backup:cluster:[TEST_PATH]/backrest/backup/db + DEBUG: backup_regexp_get(1, 0, 0): ^[0-9]{8}\-[0-9]{6}F$ + DEBUG: File->list: backup:cluster:[TEST_PATH]/backrest/backup/db, expression ^[0-9]{8}\-[0-9]{6}F$, sort reverse + INFO: last backup label = [BACKUP_LABEL], version = [VERSION] + DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/postmaster.pid + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common/pg_tblspc + DEBUG: Found tablespace 1 + DEBUG: Found tablespace 2 + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/tablespace/ts1 + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/tablespace/ts2 + DEBUG: File->wait: db:absolute + WARN: aborted backup exists, but cannot be resumed (resume is disabled) - will be dropped and recreated + DEBUG: File->path_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp, mode [undef] + DEBUG: File->copy: remote db:absolute:[TEST_PATH]/db/common/badchecksum.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/badchecksum.txt.gz, source_compressed = false, destination_compress = true, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/base/badchecksum.txt.gz, destination_path_create = true + DEBUG: File->path_create: absolute:[TEST_PATH]/backrest/temp/db.tmp/base, mode [undef] + DEBUG: File->exists: absolute:[TEST_PATH]/backrest/temp/db.tmp/base + INFO: backup file [TEST_PATH]/db/common/badchecksum.txt (11B, 44%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51 + DEBUG: File->copy: remote db:absolute:[TEST_PATH]/db/tablespace/ts1/tablespace1.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1/tablespace1.txt.gz, source_compressed = false, destination_compress = true, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1/tablespace1.txt.gz, destination_path_create = true + DEBUG: File->path_create: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1, mode [undef] + DEBUG: File->exists: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1 + INFO: backup file [TEST_PATH]/db/tablespace/ts1/tablespace1.txt (7B, 72%) checksum d85de07d6421d90aa9191c11c889bfde43680f0f + DEBUG: File->copy: remote db:absolute:[TEST_PATH]/db/tablespace/ts2/tablespace2.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2/tablespace2.txt.gz, source_compressed = false, destination_compress = true, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2/tablespace2.txt.gz, destination_path_create = true + DEBUG: File->path_create: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2, mode [undef] + DEBUG: File->exists: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2 + INFO: backup file [TEST_PATH]/db/tablespace/ts2/tablespace2.txt (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578 + INFO: 25B total backup + INFO: new backup label: [BACKUP_LABEL] + DEBUG: moving [TEST_PATH]/backrest/temp/db.tmp to [TEST_PATH]/backrest/backup/db/[BACKUP_LABEL] + DEBUG: File->move: backup:tmp to backup:cluster:[BACKUP_LABEL], destination_path_create = false + DEBUG: File->remove: backup:cluster:[TEST_PATH]/backrest/backup/db/latest + DEBUG: File->link_create: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL] to backup:cluster:[TEST_PATH]/backrest/backup/db/latest, hard = false, relative = true, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef] + INFO: archive rentention type not set - archive logs will not be expired + DEBUG: safe exit called, terminating threads + restore, backup '[BACKUP_LABEL]', expect exit 115 (fail on used path) > [BACKREST_BIN_PATH]/pg_backrest.pl --config=[TEST_PATH]/db/pg_backrest.conf --set=[BACKUP_LABEL] --stanza=db restore ------------------------------------------------------------------------------------------------------------------------------------ diff --git a/test/log/backup-synthetic-008.log b/test/log/backup-synthetic-008.log index 88501150e..97c73f6f1 100644 --- a/test/log/backup-synthetic-008.log +++ b/test/log/backup-synthetic-008.log @@ -279,6 +279,65 @@ diff backup (cannot resume - new diff) INFO: archive rentention type not set - archive logs will not be expired DEBUG: safe exit called, terminating threads +diff backup (cannot resume - disabled) +> [BACKREST_BIN_PATH]/pg_backrest.pl --config=[TEST_PATH]/backrest/pg_backrest.conf --no-start-stop --no-resume --type=diff --stanza=db backup --test --test-delay=0 +------------------------------------------------------------------------------------------------------------------------------------ + DEBUG: cluster path is [TEST_PATH]/db/common + DEBUG: File->path_create: backup:cluster:[TEST_PATH]/backrest/backup/db, mode [undef] + DEBUG: File->exists: backup:cluster:[TEST_PATH]/backrest/backup/db + DEBUG: backup_regexp_get(1, 0, 0): ^[0-9]{8}\-[0-9]{6}F$ + DEBUG: File->list: backup:cluster:[TEST_PATH]/backrest/backup/db, expression ^[0-9]{8}\-[0-9]{6}F$, sort reverse + INFO: last backup label = [BACKUP_LABEL], version = [VERSION] + DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/postmaster.pid + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common/pg_tblspc + DEBUG: Found tablespace 1 + DEBUG: Found tablespace 2 + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/tablespace/ts1 + DEBUG: Manifest->build + DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/tablespace/ts2 + DEBUG: File->wait: db:absolute + WARN: aborted backup exists, but cannot be resumed (resume is disabled) - will be dropped and recreated + DEBUG: File->path_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp, mode [undef] + DEBUG: File->path_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/base, mode [undef] + DEBUG: File->path_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/path-test, mode [undef] + DEBUG: File->path_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/pg_tblspc, mode [undef] + DEBUG: File->link_create: backup:absolute:/test to backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/link-test, hard = false, relative = false, destination_path_create = false + DEBUG: hard-linking [TEST_PATH]/db/common/PG_VERSION from [BACKUP_LABEL] + DEBUG: File->link_create: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/PG_VERSION to backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/PG_VERSION, hard = true, relative = false, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/temp/db.tmp/base, mode [undef] + DEBUG: hard-linking [TEST_PATH]/db/common/base/base1.txt from [BACKUP_LABEL] + DEBUG: File->link_create: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/base/base1.txt to backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/base/base1.txt, hard = true, relative = false, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/temp/db.tmp/base/base, mode [undef] + DEBUG: File->link_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1 to backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/pg_tblspc/1, hard = false, relative = true, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/temp/db.tmp/base/pg_tblspc, mode [undef] + DEBUG: File->link_create: backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2 to backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/pg_tblspc/2, hard = false, relative = true, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/temp/db.tmp/base/pg_tblspc, mode [undef] + DEBUG: File->copy: remote db:absolute:[TEST_PATH]/db/common/badchecksum.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/base/badchecksum.txt.gz, source_compressed = false, destination_compress = true, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/base/badchecksum.txt.gz, destination_path_create = true + INFO: backup file [TEST_PATH]/db/common/badchecksum.txt (11B, 44%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51 + DEBUG: File->copy: remote db:absolute:[TEST_PATH]/db/tablespace/ts1/tablespace1.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1/tablespace1.txt.gz, source_compressed = false, destination_compress = true, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1/tablespace1.txt.gz, destination_path_create = true + DEBUG: File->path_create: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1, mode [undef] + DEBUG: File->exists: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/1 + INFO: backup file [TEST_PATH]/db/tablespace/ts1/tablespace1.txt (7B, 72%) checksum d85de07d6421d90aa9191c11c889bfde43680f0f + DEBUG: File->copy: remote db:absolute:[TEST_PATH]/db/tablespace/ts2/tablespace2.txt to local backup:tmp:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2/tablespace2.txt.gz, source_compressed = false, destination_compress = true, ignore_missing_source = true, destination_path_create = true, modification_time = [MODIFICATION_TIME], mode = [undef], user = [undef], group = [undef] + DEBUG: File->move: absolute:[TEST_PATH]/backrest/temp/db.tmp/file.tmp to absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2/tablespace2.txt.gz, destination_path_create = true + DEBUG: File->path_create: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2, mode [undef] + DEBUG: File->exists: absolute:[TEST_PATH]/backrest/temp/db.tmp/tablespace/2 + INFO: backup file [TEST_PATH]/db/tablespace/ts2/tablespace2.txt (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578 + INFO: 25B total backup + INFO: new backup label: [BACKUP_LABEL] + DEBUG: moving [TEST_PATH]/backrest/temp/db.tmp to [TEST_PATH]/backrest/backup/db/[BACKUP_LABEL] + DEBUG: File->move: backup:tmp to backup:cluster:[BACKUP_LABEL], destination_path_create = false + DEBUG: File->remove: backup:cluster:[TEST_PATH]/backrest/backup/db/latest + DEBUG: File->link_create: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL] to backup:cluster:[TEST_PATH]/backrest/backup/db/latest, hard = false, relative = true, destination_path_create = true + DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef] + INFO: archive rentention type not set - archive logs will not be expired + DEBUG: safe exit called, terminating threads + restore, backup '[BACKUP_LABEL]', expect exit 115 (fail on used path) > [BACKREST_BIN_PATH]/pg_backrest.pl --config=[TEST_PATH]/db/pg_backrest.conf --set=[BACKUP_LABEL] --stanza=db restore ------------------------------------------------------------------------------------------------------------------------------------