2014-06-22 17:30:17 +03:00
|
|
|
#!/usr/bin/perl
|
|
|
|
####################################################################################################################################
|
|
|
|
# CommonTest.pm - Common globals used for testing
|
|
|
|
####################################################################################################################################
|
|
|
|
package BackRestTest::CommonTest;
|
|
|
|
|
|
|
|
####################################################################################################################################
|
|
|
|
# Perl includes
|
|
|
|
####################################################################################################################################
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
use Carp;
|
|
|
|
|
|
|
|
use File::Basename;
|
|
|
|
use Cwd 'abs_path';
|
2014-07-03 02:15:21 +03:00
|
|
|
use IPC::Open3;
|
2014-09-18 18:28:23 +03:00
|
|
|
use POSIX ':sys_wait_h';
|
2014-07-27 21:03:21 +03:00
|
|
|
use IO::Select;
|
2014-06-22 17:30:17 +03:00
|
|
|
|
2014-09-18 18:28:23 +03:00
|
|
|
use lib dirname($0) . '/../lib';
|
2014-06-22 18:56:01 +03:00
|
|
|
use BackRest::Utility;
|
2014-06-22 21:51:28 +03:00
|
|
|
use BackRest::File;
|
2014-06-22 18:56:01 +03:00
|
|
|
|
2014-06-22 17:30:17 +03:00
|
|
|
use Exporter qw(import);
|
2014-08-10 22:02:14 +03:00
|
|
|
our @EXPORT = qw(BackRestTestCommon_Setup BackRestTestCommon_ExecuteBegin BackRestTestCommon_ExecuteEnd
|
|
|
|
BackRestTestCommon_Execute BackRestTestCommon_ExecuteBackRest
|
2014-07-16 05:32:41 +03:00
|
|
|
BackRestTestCommon_ConfigCreate BackRestTestCommon_Run BackRestTestCommon_Cleanup
|
2014-08-11 04:22:17 +03:00
|
|
|
BackRestTestCommon_PgSqlBinPathGet BackRestTestCommon_StanzaGet BackRestTestCommon_CommandMainGet
|
|
|
|
BackRestTestCommon_CommandRemoteGet BackRestTestCommon_HostGet BackRestTestCommon_UserGet
|
|
|
|
BackRestTestCommon_GroupGet BackRestTestCommon_UserBackRestGet BackRestTestCommon_TestPathGet
|
|
|
|
BackRestTestCommon_DataPathGet BackRestTestCommon_BackupPathGet BackRestTestCommon_ArchivePathGet
|
2014-09-20 00:51:51 +03:00
|
|
|
BackRestTestCommon_DbPathGet BackRestTestCommon_DbCommonPathGet BackRestTestCommon_DbTablespacePathGet
|
|
|
|
BackRestTestCommon_DbPortGet);
|
2014-06-22 17:30:17 +03:00
|
|
|
|
2014-08-11 04:22:17 +03:00
|
|
|
my $strPgSqlBin;
|
2014-06-22 17:30:17 +03:00
|
|
|
my $strCommonStanza;
|
2014-06-22 21:51:28 +03:00
|
|
|
my $strCommonCommandMain;
|
2014-06-22 17:30:17 +03:00
|
|
|
my $strCommonCommandRemote;
|
2014-06-22 21:51:28 +03:00
|
|
|
my $strCommonCommandPsql;
|
2014-06-22 17:30:17 +03:00
|
|
|
my $strCommonHost;
|
|
|
|
my $strCommonUser;
|
|
|
|
my $strCommonGroup;
|
|
|
|
my $strCommonUserBackRest;
|
|
|
|
my $strCommonTestPath;
|
2014-07-13 16:13:19 +03:00
|
|
|
my $strCommonDataPath;
|
2014-06-22 21:51:28 +03:00
|
|
|
my $strCommonBackupPath;
|
2014-06-29 17:53:39 +03:00
|
|
|
my $strCommonArchivePath;
|
2014-06-22 21:51:28 +03:00
|
|
|
my $strCommonDbPath;
|
|
|
|
my $strCommonDbCommonPath;
|
2014-09-20 00:51:51 +03:00
|
|
|
my $strCommonDbTablespacePath;
|
2014-06-22 18:56:01 +03:00
|
|
|
my $iCommonDbPort;
|
2014-07-16 05:32:41 +03:00
|
|
|
my $iModuleTestRun;
|
|
|
|
my $bDryRun;
|
|
|
|
my $bNoCleanup;
|
|
|
|
|
2014-08-10 22:02:14 +03:00
|
|
|
# Execution globals
|
|
|
|
my $strErrorLog;
|
|
|
|
my $hError;
|
|
|
|
my $strOutLog;
|
|
|
|
my $hOut;
|
|
|
|
my $pId;
|
|
|
|
my $strCommand;
|
|
|
|
|
2014-07-16 05:32:41 +03:00
|
|
|
####################################################################################################################################
|
|
|
|
# BackRestTestBackup_Run
|
|
|
|
####################################################################################################################################
|
|
|
|
sub BackRestTestCommon_Run
|
|
|
|
{
|
|
|
|
my $iRun = shift;
|
|
|
|
my $strLog = shift;
|
|
|
|
|
|
|
|
if (defined($iModuleTestRun) && $iModuleTestRun != $iRun)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2014-09-18 18:28:23 +03:00
|
|
|
&log(INFO, 'run ' . sprintf('%03d', $iRun) . ' - ' . $strLog);
|
2014-07-16 05:32:41 +03:00
|
|
|
|
|
|
|
if ($bDryRun)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
####################################################################################################################################
|
|
|
|
# BackRestTestBackup_Cleanup
|
|
|
|
####################################################################################################################################
|
|
|
|
sub BackRestTestCommon_Cleanup
|
|
|
|
{
|
|
|
|
return !$bNoCleanup && !$bDryRun;
|
|
|
|
}
|
2014-06-22 18:56:01 +03:00
|
|
|
|
|
|
|
####################################################################################################################################
|
2014-08-10 22:02:14 +03:00
|
|
|
# BackRestTestBackup_ExecuteBegin
|
2014-06-22 18:56:01 +03:00
|
|
|
####################################################################################################################################
|
2014-08-10 22:02:14 +03:00
|
|
|
sub BackRestTestCommon_ExecuteBegin
|
2014-07-03 01:58:38 +03:00
|
|
|
{
|
2014-08-10 22:02:14 +03:00
|
|
|
my $strCommandParam = shift;
|
2014-07-03 01:58:38 +03:00
|
|
|
my $bRemote = shift;
|
|
|
|
|
|
|
|
# Set defaults
|
|
|
|
$bRemote = defined($bRemote) ? $bRemote : false;
|
|
|
|
|
|
|
|
if ($bRemote)
|
|
|
|
{
|
2014-08-10 22:02:14 +03:00
|
|
|
$strCommand = "ssh ${strCommonUserBackRest}\@${strCommonHost} '${strCommandParam}'";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$strCommand = $strCommandParam;
|
2014-07-03 01:58:38 +03:00
|
|
|
}
|
|
|
|
|
2014-08-10 22:02:14 +03:00
|
|
|
$strErrorLog = '';
|
|
|
|
$hError = undef;
|
|
|
|
$strOutLog = '';
|
|
|
|
$hOut = undef;
|
2014-07-12 17:26:51 +03:00
|
|
|
|
2014-10-02 17:55:38 +03:00
|
|
|
&log(DEBUG, "executing command: ${strCommand}");
|
|
|
|
|
2014-07-28 01:13:23 +03:00
|
|
|
# Execute the command
|
2014-08-10 22:02:14 +03:00
|
|
|
$pId = open3(undef, $hOut, $hError, $strCommand);
|
|
|
|
}
|
|
|
|
|
|
|
|
####################################################################################################################################
|
|
|
|
# BackRestTestBackup_ExecuteEnd
|
|
|
|
####################################################################################################################################
|
|
|
|
sub BackRestTestCommon_ExecuteEnd
|
|
|
|
{
|
|
|
|
my $strTest = shift;
|
|
|
|
my $bSuppressError = shift;
|
|
|
|
|
|
|
|
# Set defaults
|
|
|
|
$bSuppressError = defined($bSuppressError) ? $bSuppressError : false;
|
2014-07-28 01:13:23 +03:00
|
|
|
|
|
|
|
# Create select objects
|
2014-07-27 21:03:21 +03:00
|
|
|
my $oErrorSelect = IO::Select->new();
|
|
|
|
$oErrorSelect->add($hError);
|
|
|
|
my $oOutSelect = IO::Select->new();
|
|
|
|
$oOutSelect->add($hOut);
|
2014-07-03 02:15:21 +03:00
|
|
|
|
2014-07-28 01:13:23 +03:00
|
|
|
# While the process is running drain the stdout and stderr streams
|
2014-07-27 21:03:21 +03:00
|
|
|
while(waitpid($pId, WNOHANG) == 0)
|
2014-07-03 01:58:38 +03:00
|
|
|
{
|
2014-07-28 01:13:23 +03:00
|
|
|
# Drain the stderr stream
|
2014-07-27 21:03:21 +03:00
|
|
|
if ($oErrorSelect->can_read(.1))
|
2014-07-12 17:26:51 +03:00
|
|
|
{
|
2014-07-27 21:03:21 +03:00
|
|
|
while (my $strLine = readline($hError))
|
|
|
|
{
|
|
|
|
$strErrorLog .= $strLine;
|
|
|
|
}
|
2014-07-12 17:26:51 +03:00
|
|
|
}
|
|
|
|
|
2014-07-28 01:13:23 +03:00
|
|
|
# Drain the stdout stream
|
2014-07-27 21:03:21 +03:00
|
|
|
if ($oOutSelect->can_read(.1))
|
|
|
|
{
|
|
|
|
while (my $strLine = readline($hOut))
|
|
|
|
{
|
|
|
|
$strOutLog .= $strLine;
|
2014-08-10 22:02:14 +03:00
|
|
|
|
|
|
|
if (defined($strTest) && test_check($strLine, $strTest))
|
|
|
|
{
|
|
|
|
&log(DEBUG, "Found test ${strTest}");
|
|
|
|
return true;
|
|
|
|
}
|
2014-07-27 21:03:21 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-28 01:13:23 +03:00
|
|
|
# Check the exit status and output an error if needed
|
2014-07-27 21:03:21 +03:00
|
|
|
my $iExitStatus = ${^CHILD_ERROR_NATIVE} >> 8;
|
|
|
|
|
|
|
|
if ($iExitStatus != 0 && !$bSuppressError)
|
|
|
|
{
|
2014-08-10 01:35:55 +03:00
|
|
|
confess &log(ERROR, "command '${strCommand}' returned " . $iExitStatus . "\n" .
|
2014-07-28 01:13:23 +03:00
|
|
|
($strOutLog ne '' ? "STDOUT:\n${strOutLog}" : '') .
|
|
|
|
($strErrorLog ne '' ? "STDERR:\n${strErrorLog}" : ''));
|
2014-07-03 01:58:38 +03:00
|
|
|
}
|
2014-10-02 17:55:38 +03:00
|
|
|
else
|
|
|
|
{
|
|
|
|
&log(DEBUG, "suppressed error was ${iExitStatus}");
|
|
|
|
}
|
2014-08-10 22:02:14 +03:00
|
|
|
|
|
|
|
$hError = undef;
|
|
|
|
$hOut = undef;
|
|
|
|
|
2014-10-02 17:55:38 +03:00
|
|
|
return $iExitStatus;
|
2014-08-10 22:02:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
####################################################################################################################################
|
|
|
|
# BackRestTestBackup_Execute
|
|
|
|
####################################################################################################################################
|
|
|
|
sub BackRestTestCommon_Execute
|
|
|
|
{
|
|
|
|
my $strCommand = shift;
|
|
|
|
my $bRemote = shift;
|
|
|
|
my $bSuppressError = shift;
|
|
|
|
|
|
|
|
BackRestTestCommon_ExecuteBegin($strCommand, $bRemote);
|
2014-10-02 17:55:38 +03:00
|
|
|
return BackRestTestCommon_ExecuteEnd(undef, $bSuppressError);
|
2014-06-22 18:56:01 +03:00
|
|
|
}
|
|
|
|
|
2014-06-22 17:30:17 +03:00
|
|
|
####################################################################################################################################
|
2014-06-22 17:54:31 +03:00
|
|
|
# BackRestTestCommon_Setup
|
2014-06-22 17:30:17 +03:00
|
|
|
####################################################################################################################################
|
2014-06-22 17:54:31 +03:00
|
|
|
sub BackRestTestCommon_Setup
|
2014-06-22 17:30:17 +03:00
|
|
|
{
|
2014-08-11 04:22:17 +03:00
|
|
|
my $strTestPathParam = shift;
|
|
|
|
my $strPgSqlBinParam = shift;
|
2014-07-16 05:32:41 +03:00
|
|
|
my $iModuleTestRunParam = shift;
|
|
|
|
my $bDryRunParam = shift;
|
|
|
|
my $bNoCleanupParam = shift;
|
|
|
|
|
2014-07-27 21:03:21 +03:00
|
|
|
my $strBasePath = dirname(dirname(abs_path($0)));
|
|
|
|
|
2014-08-11 04:22:17 +03:00
|
|
|
$strPgSqlBin = $strPgSqlBinParam;
|
|
|
|
|
2014-09-18 18:28:23 +03:00
|
|
|
$strCommonStanza = 'db';
|
2014-06-22 21:51:28 +03:00
|
|
|
$strCommonHost = '127.0.0.1';
|
2014-06-22 17:30:17 +03:00
|
|
|
$strCommonUser = getpwuid($<);
|
|
|
|
$strCommonGroup = getgrgid($();
|
|
|
|
$strCommonUserBackRest = 'backrest';
|
2014-08-10 22:02:14 +03:00
|
|
|
|
2014-08-11 04:22:17 +03:00
|
|
|
if (defined($strTestPathParam))
|
|
|
|
{
|
|
|
|
$strCommonTestPath = $strTestPathParam;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$strCommonTestPath = "${strBasePath}/test/test";
|
|
|
|
}
|
|
|
|
|
2014-07-27 21:03:21 +03:00
|
|
|
$strCommonDataPath = "${strBasePath}/test/data";
|
2014-06-22 21:51:28 +03:00
|
|
|
$strCommonBackupPath = "${strCommonTestPath}/backrest";
|
2014-06-29 17:53:39 +03:00
|
|
|
$strCommonArchivePath = "${strCommonTestPath}/archive";
|
2014-06-22 21:51:28 +03:00
|
|
|
$strCommonDbPath = "${strCommonTestPath}/db";
|
|
|
|
$strCommonDbCommonPath = "${strCommonTestPath}/db/common";
|
2014-09-20 00:51:51 +03:00
|
|
|
$strCommonDbTablespacePath = "${strCommonTestPath}/db/tablespace";
|
2014-08-10 22:02:14 +03:00
|
|
|
|
|
|
|
$strCommonCommandMain = "${strBasePath}/bin/pg_backrest.pl";
|
|
|
|
$strCommonCommandRemote = "${strBasePath}/bin/pg_backrest_remote.pl";
|
2014-08-11 04:22:17 +03:00
|
|
|
$strCommonCommandPsql = "${strPgSqlBin}/psql -X %option% -h ${strCommonDbPath}";
|
2014-08-10 22:02:14 +03:00
|
|
|
|
2014-06-22 18:56:01 +03:00
|
|
|
$iCommonDbPort = 6543;
|
2014-07-16 05:32:41 +03:00
|
|
|
$iModuleTestRun = $iModuleTestRunParam;
|
|
|
|
$bDryRun = $bDryRunParam;
|
|
|
|
$bNoCleanup = $bNoCleanupParam;
|
2014-06-22 17:30:17 +03:00
|
|
|
}
|
|
|
|
|
2014-06-22 21:51:28 +03:00
|
|
|
####################################################################################################################################
|
|
|
|
# BackRestTestCommon_ConfigCreate
|
|
|
|
####################################################################################################################################
|
|
|
|
sub BackRestTestCommon_ConfigCreate
|
|
|
|
{
|
2014-06-22 23:05:00 +03:00
|
|
|
my $strLocal = shift;
|
2014-06-22 21:51:28 +03:00
|
|
|
my $strRemote = shift;
|
2014-07-16 05:32:41 +03:00
|
|
|
my $bCompress = shift;
|
|
|
|
my $bChecksum = shift;
|
|
|
|
my $bHardlink = shift;
|
|
|
|
my $iThreadMax = shift;
|
2014-07-13 02:03:39 +03:00
|
|
|
my $bArchiveLocal = shift;
|
2014-07-16 05:32:41 +03:00
|
|
|
my $bCompressAsync = shift;
|
2014-06-24 01:54:00 +03:00
|
|
|
|
2014-06-22 21:51:28 +03:00
|
|
|
my %oParamHash;
|
|
|
|
|
2014-07-17 03:07:50 +03:00
|
|
|
if (defined($strRemote))
|
|
|
|
{
|
|
|
|
$oParamHash{'global:command'}{'remote'} = $strCommonCommandRemote;
|
|
|
|
}
|
|
|
|
|
2014-06-22 21:51:28 +03:00
|
|
|
$oParamHash{'global:command'}{'psql'} = $strCommonCommandPsql;
|
|
|
|
|
|
|
|
if (defined($strRemote) && $strRemote eq REMOTE_BACKUP)
|
|
|
|
{
|
|
|
|
$oParamHash{'global:backup'}{'host'} = $strCommonHost;
|
|
|
|
$oParamHash{'global:backup'}{'user'} = $strCommonUserBackRest;
|
|
|
|
}
|
|
|
|
elsif (defined($strRemote) && $strRemote eq REMOTE_DB)
|
|
|
|
{
|
|
|
|
$oParamHash{$strCommonStanza}{'host'} = $strCommonHost;
|
|
|
|
$oParamHash{$strCommonStanza}{'user'} = $strCommonUser;
|
2014-06-22 23:05:00 +03:00
|
|
|
}
|
2014-06-24 01:54:00 +03:00
|
|
|
|
2014-07-28 01:13:23 +03:00
|
|
|
$oParamHash{'global:log'}{'level-console'} = 'error';
|
2014-07-17 03:07:50 +03:00
|
|
|
$oParamHash{'global:log'}{'level-file'} = 'trace';
|
|
|
|
|
2014-06-22 23:05:00 +03:00
|
|
|
if ($strLocal eq REMOTE_BACKUP)
|
|
|
|
{
|
2014-07-16 05:32:41 +03:00
|
|
|
if (defined($bHardlink) && $bHardlink)
|
|
|
|
{
|
|
|
|
$oParamHash{'global:backup'}{'hardlink'} = 'y';
|
|
|
|
}
|
2014-06-22 21:51:28 +03:00
|
|
|
}
|
2014-06-22 23:05:00 +03:00
|
|
|
elsif ($strLocal eq REMOTE_DB)
|
|
|
|
{
|
2014-07-17 03:07:50 +03:00
|
|
|
if (defined($strRemote))
|
|
|
|
{
|
|
|
|
$oParamHash{'global:log'}{'level-console'} = 'trace';
|
|
|
|
}
|
2014-07-16 05:32:41 +03:00
|
|
|
|
|
|
|
if ($bArchiveLocal)
|
|
|
|
{
|
|
|
|
$oParamHash{'global:archive'}{path} = BackRestTestCommon_ArchivePathGet();
|
|
|
|
|
|
|
|
if (!$bCompressAsync)
|
|
|
|
{
|
|
|
|
$oParamHash{'global:archive'}{'compress_async'} = 'n';
|
|
|
|
}
|
|
|
|
}
|
2014-06-22 23:05:00 +03:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
confess "invalid local type ${strLocal}";
|
|
|
|
}
|
2014-06-22 21:51:28 +03:00
|
|
|
|
2014-07-17 03:07:50 +03:00
|
|
|
if (($strLocal eq REMOTE_BACKUP) || ($strLocal eq REMOTE_DB && !defined($strRemote)))
|
|
|
|
{
|
|
|
|
$oParamHash{'db:command:option'}{'psql'} = "--port=${iCommonDbPort}";
|
|
|
|
}
|
|
|
|
|
2014-07-16 05:32:41 +03:00
|
|
|
if (defined($bCompress) && !$bCompress)
|
|
|
|
{
|
|
|
|
$oParamHash{'global:backup'}{'compress'} = 'n';
|
|
|
|
}
|
|
|
|
|
|
|
|
if (defined($bChecksum) && !$bChecksum)
|
2014-07-13 02:03:39 +03:00
|
|
|
{
|
2014-07-16 05:32:41 +03:00
|
|
|
$oParamHash{'global:backup'}{'checksum'} = 'n';
|
2014-07-13 02:03:39 +03:00
|
|
|
}
|
|
|
|
|
2014-06-24 01:54:00 +03:00
|
|
|
$oParamHash{$strCommonStanza}{'path'} = $strCommonDbCommonPath;
|
2014-06-22 21:51:28 +03:00
|
|
|
$oParamHash{'global:backup'}{'path'} = $strCommonBackupPath;
|
2014-06-24 01:54:00 +03:00
|
|
|
|
2014-07-16 05:32:41 +03:00
|
|
|
if (defined($iThreadMax))
|
2014-06-28 21:32:34 +03:00
|
|
|
{
|
2014-07-16 05:32:41 +03:00
|
|
|
$oParamHash{'global:backup'}{'thread-max'} = $iThreadMax;
|
2014-06-28 21:32:34 +03:00
|
|
|
}
|
|
|
|
|
2014-06-29 17:53:39 +03:00
|
|
|
# Write out the configuration file
|
|
|
|
my $strFile = BackRestTestCommon_TestPathGet() . '/pg_backrest.conf';
|
2014-07-27 21:26:07 +03:00
|
|
|
config_save($strFile, \%oParamHash);
|
2014-06-24 01:54:00 +03:00
|
|
|
|
2014-06-29 17:53:39 +03:00
|
|
|
# Move the configuration file based on local
|
|
|
|
if ($strLocal eq 'db')
|
|
|
|
{
|
|
|
|
rename($strFile, BackRestTestCommon_DbPathGet() . '/pg_backrest.conf')
|
|
|
|
or die "unable to move ${strFile} to " . BackRestTestCommon_DbPathGet() . '/pg_backrest.conf path';
|
|
|
|
}
|
|
|
|
elsif ($strLocal eq 'backup' && !defined($strRemote))
|
|
|
|
{
|
|
|
|
rename($strFile, BackRestTestCommon_BackupPathGet() . '/pg_backrest.conf')
|
|
|
|
or die "unable to move ${strFile} to " . BackRestTestCommon_BackupPathGet() . '/pg_backrest.conf path';
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-09-18 18:28:23 +03:00
|
|
|
BackRestTestCommon_Execute("mv ${strFile} " . BackRestTestCommon_BackupPathGet() . '/pg_backrest.conf', true);
|
2014-06-29 17:53:39 +03:00
|
|
|
}
|
2014-06-22 21:51:28 +03:00
|
|
|
}
|
|
|
|
|
2014-06-22 17:30:17 +03:00
|
|
|
####################################################################################################################################
|
|
|
|
# Get Methods
|
|
|
|
####################################################################################################################################
|
2014-08-11 04:22:17 +03:00
|
|
|
sub BackRestTestCommon_PgSqlBinPathGet
|
|
|
|
{
|
|
|
|
return $strPgSqlBin;
|
|
|
|
}
|
|
|
|
|
2014-06-22 17:54:31 +03:00
|
|
|
sub BackRestTestCommon_StanzaGet
|
2014-06-22 17:30:17 +03:00
|
|
|
{
|
|
|
|
return $strCommonStanza;
|
|
|
|
}
|
|
|
|
|
2014-06-22 21:51:28 +03:00
|
|
|
sub BackRestTestCommon_CommandMainGet
|
|
|
|
{
|
|
|
|
return $strCommonCommandMain;
|
|
|
|
}
|
|
|
|
|
2014-06-22 17:54:31 +03:00
|
|
|
sub BackRestTestCommon_CommandRemoteGet
|
2014-06-22 17:30:17 +03:00
|
|
|
{
|
|
|
|
return $strCommonCommandRemote;
|
|
|
|
}
|
|
|
|
|
2014-06-22 17:54:31 +03:00
|
|
|
sub BackRestTestCommon_HostGet
|
2014-06-22 17:30:17 +03:00
|
|
|
{
|
|
|
|
return $strCommonHost;
|
|
|
|
}
|
|
|
|
|
2014-06-22 17:54:31 +03:00
|
|
|
sub BackRestTestCommon_UserGet
|
2014-06-22 17:30:17 +03:00
|
|
|
{
|
|
|
|
return $strCommonUser;
|
|
|
|
}
|
|
|
|
|
2014-06-22 17:54:31 +03:00
|
|
|
sub BackRestTestCommon_GroupGet
|
2014-06-22 17:30:17 +03:00
|
|
|
{
|
|
|
|
return $strCommonGroup;
|
|
|
|
}
|
|
|
|
|
2014-06-22 17:54:31 +03:00
|
|
|
sub BackRestTestCommon_UserBackRestGet
|
2014-06-22 17:30:17 +03:00
|
|
|
{
|
|
|
|
return $strCommonUserBackRest;
|
|
|
|
}
|
|
|
|
|
2014-06-22 17:54:31 +03:00
|
|
|
sub BackRestTestCommon_TestPathGet
|
2014-06-22 17:30:17 +03:00
|
|
|
{
|
|
|
|
return $strCommonTestPath;
|
|
|
|
}
|
|
|
|
|
2014-07-13 16:13:19 +03:00
|
|
|
sub BackRestTestCommon_DataPathGet
|
|
|
|
{
|
|
|
|
return $strCommonDataPath;
|
|
|
|
}
|
|
|
|
|
2014-06-22 21:51:28 +03:00
|
|
|
sub BackRestTestCommon_BackupPathGet
|
|
|
|
{
|
|
|
|
return $strCommonBackupPath;
|
|
|
|
}
|
|
|
|
|
2014-06-29 17:53:39 +03:00
|
|
|
sub BackRestTestCommon_ArchivePathGet
|
|
|
|
{
|
|
|
|
return $strCommonArchivePath;
|
|
|
|
}
|
|
|
|
|
2014-06-22 21:51:28 +03:00
|
|
|
sub BackRestTestCommon_DbPathGet
|
|
|
|
{
|
|
|
|
return $strCommonDbPath;
|
|
|
|
}
|
|
|
|
|
|
|
|
sub BackRestTestCommon_DbCommonPathGet
|
|
|
|
{
|
|
|
|
return $strCommonDbCommonPath;
|
|
|
|
}
|
|
|
|
|
2014-09-20 00:51:51 +03:00
|
|
|
sub BackRestTestCommon_DbTablespacePathGet
|
|
|
|
{
|
|
|
|
return $strCommonDbTablespacePath;
|
|
|
|
}
|
|
|
|
|
2014-06-22 18:56:01 +03:00
|
|
|
sub BackRestTestCommon_DbPortGet
|
|
|
|
{
|
|
|
|
return $iCommonDbPort;
|
|
|
|
}
|
|
|
|
|
2014-06-22 17:30:17 +03:00
|
|
|
1;
|