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

Added backup command

This commit is contained in:
David Steele
2013-12-10 20:16:43 -05:00
parent 0bdccd2982
commit 0dba2ab8c7

View File

@@ -144,6 +144,16 @@ sub wait_for_file
die "could not find $strDir/$strRegEx after $iSeconds second(s)";
}
sub pgbr_backup
{
my $strBackRestBinPath = shift;
my $strCluster = shift;
my $strCommand = "$strBackRestBinPath/pg_backrest.pl --config=$strBackRestBinPath/pg_backrest.conf backup $strCluster";
execute($strCommand);
}
my $strUser = execute('whoami');
my $strTestPath = "/Users/dsteele/test";
@@ -227,3 +237,8 @@ $dbh->disconnect();
# Stop the server
################################################################################
pg_stop($strPgBinPath, "$strTestPath/$strDbDir/common");
################################################################################
# Start an offline backup
################################################################################
pgbr_backup($strBackRestBinPath, "db");