1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-11-29 22:28:02 +02:00

Some notes. removed dead .backup move

This commit is contained in:
David Steele
2014-01-15 20:41:29 -05:00
parent a7de734105
commit 3719d54cc9
2 changed files with 6 additions and 16 deletions

View File

@@ -12,8 +12,8 @@ psql=/Library/PostgreSQL/9.3/bin/psql --port=6001
backup_path=/Users/dsteele/test/backup
full_retention=2
differential_retention=2
incremental_retention=2
wal_retention=1
wal_retention_type=full,diff,incr
wal_retention=2 # 0 means since the last type
[cluster:db]
data_path=/Users/dsteele/test/db/common

View File

@@ -991,20 +991,6 @@ if ($strOperation eq "backup")
&log(INFO, 'Backup archive stop: ' . $strArchiveStop);
# Fetch the backup file and put it in pg_xlog (this file is just for reference)
my $hDir;
opendir $hDir, "${strBackupClusterPath}/archive" or die "Could not open dir: $!\n";
my @stryFile = grep(/^${strArchiveStart}\.[0-F]{8}\.backup$/i, readdir $hDir);
close $hDir;
if (scalar @stryFile != 1)
{
die &log(ERROR, "Unable to find backup file (or found multiple matches)");
}
rename("${strBackupClusterPath}/archive/" . $stryFile[0], "$strBackupTmpPath/base/pg_xlog/" . $stryFile[0]) or die "Unable to move backup file";
# Fetch the archive logs and put them in pg_xlog
my @stryArchive = archive_list_get($strArchiveStart, $strArchiveStop);
@@ -1035,4 +1021,8 @@ if ($strOperation eq "backup")
# Rename the backup tmp path to complete the backup
rename($strBackupTmpPath, "${strBackupClusterPath}/${strBackupPath}") or die &log(ERROR, "unable to ${strBackupTmpPath} rename to ${strBackupPath}");
# !!! Expiration goes here - allow this to be run separately?
exit 0;
}