1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2026-06-20 01:17:49 +02:00

Added the feature backlog.

This commit is contained in:
David Steele
2014-04-11 14:15:56 -04:00
parent 06b8eefd19
commit d8c488f73f
2 changed files with 44 additions and 42 deletions
+3 -1
View File
@@ -16,7 +16,9 @@ Simple Postgres Backup and Restore
* Database restore.
* --version param.
* --version param (with VERSION file written to directory).
* Move backups to be removed to temp before deleting.
## release notes
+41 -41
View File
@@ -24,56 +24,56 @@ sub BackRestTestFile
# Test copy()
for (my $bSourceCompressed = 0; $bSourceCompressed <= 1; $bSourceCompressed++)
{
# Loop through destination compression
for (my $bDestinationCompressed = 0; $bDestinationCompressed <= 1; $bDestinationCompressed++)
{
print "srccmp $bSourceCompressed, dstcmp $bDestinationCompressed\n";
# Loop through destination compression
for (my $bDestinationCompressed = 0; $bDestinationCompressed <= 1; $bDestinationCompressed++)
{
print "srccmp $bSourceCompressed, dstcmp $bDestinationCompressed\n";
# Drop the old test directory and create a new one
system("rm -rf test");
system("mkdir test") == 0 or confess "Unable to create the test directory";
# Drop the old test directory and create a new one
system("rm -rf test");
system("mkdir test") == 0 or confess "Unable to create the test directory";
# system("mkdir test/backup") == 0 or confess "Unable to create the test/backup directory";
# system("mkdir test/db") == 0 or confess "Unable to create the test/db directory";
my $strSourceFile = "test/test-source.txt";
my $strDestinationFile = "test/test-destination.txt";
my $strSourceFile = "test/test-source.txt";
my $strDestinationFile = "test/test-destination.txt";
# Create the compressed or uncompressed test file
if ($bSourceCompressed)
{
$strSourceFile .= ".gz";
system("echo 'TESTDATA' | gzip > ${strSourceFile}");
}
else
{
system("echo 'TESTDATA' > ${strSourceFile}");
}
# Create the compressed or uncompressed test file
if ($bSourceCompressed)
{
$strSourceFile .= ".gz";
system("echo 'TESTDATA' | gzip > ${strSourceFile}");
}
else
{
system("echo 'TESTDATA' > ${strSourceFile}");
}
# Create the file object based on current values
my $oFile = pg_backrest_file->new
(
strStanza => "db",
bNoCompression => !$bDestinationCompressed,
strBackupPath => "test/backup",
strBackupUser => undef,
strBackupHost => undef,
strBackupPath => "test/backup",
strBackupClusterPath => "test/db",
strCommandCompress => "gzip --stdout %file%",
strCommandDecompress => "gzip -dc %file%"
);
# Create the file object based on current values
my $oFile = pg_backrest_file->new
(
strStanza => "db",
bNoCompression => !$bDestinationCompressed,
strBackupPath => "test/backup",
strBackupUser => undef,
strBackupHost => undef,
strBackupPath => "test/backup",
strBackupClusterPath => "test/db",
strCommandCompress => "gzip --stdout %file%",
strCommandDecompress => "gzip -dc %file%"
);
$oFile->file_copy(PATH_DB_ABSOLUTE, $strSourceFile, PATH_DB_ABSOLUTE, $strDestinationFile);
$oFile->file_copy(PATH_DB_ABSOLUTE, $strSourceFile, PATH_DB_ABSOLUTE, $strDestinationFile);
if ($bDestinationCompressed)
{
$strDestinationFile .= ".gz";
}
if ($bDestinationCompressed)
{
$strDestinationFile .= ".gz";
}
unless (-e $strDestinationFile)
{
confess "could not find destination file ${strDestinationFile}";
}
unless (-e $strDestinationFile)
{
confess "could not find destination file ${strDestinationFile}";
}
}
}
}