mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-01-30 05:39:12 +02:00
Remove Perl info command invocation missed in 205525b6.
This commit is contained in:
parent
f6aef6e466
commit
6b5366a663
@ -130,90 +130,77 @@ sub main
|
|||||||
ERROR_PATH_MISSING);
|
ERROR_PATH_MISSING);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Process info command
|
logFileSet(
|
||||||
|
storageLocal(),
|
||||||
|
cfgOption(CFGOPT_LOG_PATH) . '/' . cfgOption(CFGOPT_STANZA) . '-' . lc(cfgCommandName(cfgCommandGet())));
|
||||||
|
|
||||||
|
# Process delete command
|
||||||
# ----------------------------------------------------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------------------------------------------------
|
||||||
if (cfgCommandTest(CFGCMD_INFO))
|
if (cfgCommandTest(CFGCMD_STANZA_DELETE))
|
||||||
{
|
{
|
||||||
# Load module dynamically
|
# Load module dynamically
|
||||||
require pgBackRest::Info;
|
require pgBackRest::Stanza;
|
||||||
pgBackRest::Info->import();
|
pgBackRest::Stanza->import();
|
||||||
|
|
||||||
new pgBackRest::Info()->process();
|
new pgBackRest::Stanza()->process();
|
||||||
|
}
|
||||||
|
# Process restore command
|
||||||
|
# ----------------------------------------------------------------------------------------------------------------------
|
||||||
|
elsif (cfgCommandTest(CFGCMD_RESTORE))
|
||||||
|
{
|
||||||
|
# Check locality
|
||||||
|
if (!isDbLocal())
|
||||||
|
{
|
||||||
|
confess &log(ERROR,
|
||||||
|
cfgCommandName(cfgCommandGet()) . ' command must be run on the PostgreSQL host', ERROR_HOST_INVALID);
|
||||||
|
}
|
||||||
|
|
||||||
|
# Load module dynamically
|
||||||
|
require pgBackRest::Restore;
|
||||||
|
pgBackRest::Restore->import();
|
||||||
|
|
||||||
|
# Do the restore
|
||||||
|
new pgBackRest::Restore()->process();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
logFileSet(
|
# Check if processes have been stopped
|
||||||
storageLocal(),
|
lockStopTest();
|
||||||
cfgOption(CFGOPT_LOG_PATH) . '/' . cfgOption(CFGOPT_STANZA) . '-' . lc(cfgCommandName(cfgCommandGet())));
|
|
||||||
|
|
||||||
# Process delete command
|
# Check locality
|
||||||
# --------------------------------------------------------------------------------------------------------------
|
if (!isRepoLocal())
|
||||||
if (cfgCommandTest(CFGCMD_STANZA_DELETE))
|
{
|
||||||
|
confess &log(ERROR,
|
||||||
|
cfgCommandName(cfgCommandGet()) . ' command must be run on the repository host', ERROR_HOST_INVALID);
|
||||||
|
}
|
||||||
|
|
||||||
|
# Process stanza-create and stanza-upgrade commands
|
||||||
|
# ------------------------------------------------------------------------------------------------------------------
|
||||||
|
if (cfgCommandTest(CFGCMD_STANZA_CREATE) || cfgCommandTest(CFGCMD_STANZA_UPGRADE))
|
||||||
{
|
{
|
||||||
# Load module dynamically
|
# Load module dynamically
|
||||||
require pgBackRest::Stanza;
|
require pgBackRest::Stanza;
|
||||||
pgBackRest::Stanza->import();
|
pgBackRest::Stanza->import();
|
||||||
|
|
||||||
new pgBackRest::Stanza()->process();
|
$iResult = new pgBackRest::Stanza()->process();
|
||||||
}
|
}
|
||||||
# Process restore command
|
|
||||||
|
# Process backup command
|
||||||
# ------------------------------------------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------------------------------------------
|
||||||
elsif (cfgCommandTest(CFGCMD_RESTORE))
|
elsif (cfgCommandTest(CFGCMD_BACKUP))
|
||||||
{
|
{
|
||||||
# Check locality
|
|
||||||
if (!isDbLocal())
|
|
||||||
{
|
|
||||||
confess &log(ERROR,
|
|
||||||
cfgCommandName(cfgCommandGet()) . ' command must be run on the PostgreSQL host', ERROR_HOST_INVALID);
|
|
||||||
}
|
|
||||||
|
|
||||||
# Load module dynamically
|
# Load module dynamically
|
||||||
require pgBackRest::Restore;
|
require pgBackRest::Backup::Backup;
|
||||||
pgBackRest::Restore->import();
|
pgBackRest::Backup::Backup->import();
|
||||||
|
|
||||||
# Do the restore
|
new pgBackRest::Backup::Backup()->process();
|
||||||
new pgBackRest::Restore()->process();
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
# Process expire command
|
||||||
|
# --------------------------------------------------------------------------------------------------------------
|
||||||
|
elsif (cfgCommandTest(CFGCMD_EXPIRE))
|
||||||
{
|
{
|
||||||
# Check if processes have been stopped
|
new pgBackRest::Backup::Info(storageRepo()->pathGet(STORAGE_REPO_BACKUP));
|
||||||
lockStopTest();
|
|
||||||
|
|
||||||
# Check locality
|
|
||||||
if (!isRepoLocal())
|
|
||||||
{
|
|
||||||
confess &log(ERROR,
|
|
||||||
cfgCommandName(cfgCommandGet()) . ' command must be run on the repository host', ERROR_HOST_INVALID);
|
|
||||||
}
|
|
||||||
|
|
||||||
# Process stanza-create and stanza-upgrade commands
|
|
||||||
# --------------------------------------------------------------------------------------------------------------
|
|
||||||
if (cfgCommandTest(CFGCMD_STANZA_CREATE) || cfgCommandTest(CFGCMD_STANZA_UPGRADE))
|
|
||||||
{
|
|
||||||
# Load module dynamically
|
|
||||||
require pgBackRest::Stanza;
|
|
||||||
pgBackRest::Stanza->import();
|
|
||||||
|
|
||||||
$iResult = new pgBackRest::Stanza()->process();
|
|
||||||
}
|
|
||||||
|
|
||||||
# Process backup command
|
|
||||||
# --------------------------------------------------------------------------------------------------------------
|
|
||||||
elsif (cfgCommandTest(CFGCMD_BACKUP))
|
|
||||||
{
|
|
||||||
# Load module dynamically
|
|
||||||
require pgBackRest::Backup::Backup;
|
|
||||||
pgBackRest::Backup::Backup->import();
|
|
||||||
|
|
||||||
new pgBackRest::Backup::Backup()->process();
|
|
||||||
}
|
|
||||||
|
|
||||||
# Process expire command
|
|
||||||
# --------------------------------------------------------------------------------------------------------------
|
|
||||||
elsif (cfgCommandTest(CFGCMD_EXPIRE))
|
|
||||||
{
|
|
||||||
new pgBackRest::Backup::Info(storageRepo()->pathGet(STORAGE_REPO_BACKUP));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8369,17 +8369,7 @@ static const EmbeddedModule embeddedModule[] =
|
|||||||
"cfgOptionName(CFGOPT_REPO_PATH) . ' \\'' . cfgOption(CFGOPT_REPO_PATH) . '\\' does not exist',\n"
|
"cfgOptionName(CFGOPT_REPO_PATH) . ' \\'' . cfgOption(CFGOPT_REPO_PATH) . '\\' does not exist',\n"
|
||||||
"ERROR_PATH_MISSING);\n"
|
"ERROR_PATH_MISSING);\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
"\n\n\n"
|
|
||||||
"if (cfgCommandTest(CFGCMD_INFO))\n"
|
|
||||||
"{\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
"require pgBackRest::Info;\n"
|
|
||||||
"pgBackRest::Info->import();\n"
|
|
||||||
"\n"
|
|
||||||
"new pgBackRest::Info()->process();\n"
|
|
||||||
"}\n"
|
|
||||||
"else\n"
|
|
||||||
"{\n"
|
|
||||||
"logFileSet(\n"
|
"logFileSet(\n"
|
||||||
"storageLocal(),\n"
|
"storageLocal(),\n"
|
||||||
"cfgOption(CFGOPT_LOG_PATH) . '/' . cfgOption(CFGOPT_STANZA) . '-' . lc(cfgCommandName(cfgCommandGet())));\n"
|
"cfgOption(CFGOPT_LOG_PATH) . '/' . cfgOption(CFGOPT_STANZA) . '-' . lc(cfgCommandName(cfgCommandGet())));\n"
|
||||||
@ -8442,7 +8432,6 @@ static const EmbeddedModule embeddedModule[] =
|
|||||||
"}\n"
|
"}\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
"}\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
"return 1;\n"
|
"return 1;\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user