You've already forked pgbackrest
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:
committed by
David Steele
parent
526acca5bd
commit
0e9ba98a50
@ -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
|
||||
############################################################################################################################
|
||||
|
Reference in New Issue
Block a user