diff --git a/pg_backrest.conf b/pg_backrest.conf index 8d115a4f2..b5db6a4a3 100644 --- a/pg_backrest.conf +++ b/pg_backrest.conf @@ -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 diff --git a/pg_backrest.pl b/pg_backrest.pl index ec2efb9d6..ba207c39d 100755 --- a/pg_backrest.pl +++ b/pg_backrest.pl @@ -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; }