1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-01 00:25:06 +02:00

Add stanza-delete command to cleanup unused stanzas.

Contributed by Cynthia Shang.
This commit is contained in:
Cynthia Shang
2018-01-03 12:23:33 -05:00
committed by David Steele
parent 526acca5bd
commit 0e9ba98a50
27 changed files with 776 additions and 26 deletions

View File

@ -192,6 +192,24 @@ sub main
exitSafe(new pgBackRest::Info()->process());
}
############################################################################################################################
# Process stanza-delete command
############################################################################################################################
if (cfgCommandTest(CFGCMD_STANZA_DELETE))
{
if (!isRepoLocal())
{
confess &log(ERROR,
cfgCommandName(cfgCommandGet()) . ' command must be run on the backup host', ERROR_HOST_INVALID);
}
# Load module dynamically
require pgBackRest::Stanza;
pgBackRest::Stanza->import();
exitSafe(new pgBackRest::Stanza()->process());
}
############################################################################################################################
# Acquire the command lock
############################################################################################################################