PingAuthorize Server Documentation Index
Command-Line Tool Reference Home

remove-backup

Description
Examples
Arguments

Description

Safely remove a backup and optionally all of its dependent backups from the specified PingAuthorize Server backend.

This tool deletes the specified backup archive and updates the backup descriptor accordingly. If there are other (incremental) backups that depend on this backup, they will need to be removed before the base backup can be removed, unless you choose the --force option.

If you choose the --force option, the specified backup and all other backups depending on it are removed. You can use the --showDependencies option to see what incremental backups depend on a given base backup.

As an alternative to removing a specific backup, you can automatically remove backups outside of specified count or age criteria. The --retainFullBackupCount argument can be used to indicate that the specified number of full backups should be retained, and any other full backups in the directory are eligible to be removed (along any incremental backups that depend on them). The --retainFullBackupAge argument can be used to indicate that any full backups (and dependent incremental backups) older than the specified age are eligible to be removed.

Examples

Remove the backup with ID 'monday' stored in the 'backups/userRoot' folder:
remove-backup --backupDirectory backups/userRoot --backupID monday


Show what would be done when trying to remove the backup with ID 'monday' stored in the 'backups/userRoot' folder, as well as all of its dependencies, but don't actually remove any backups:
remove-backup --backupDirectory backups/userRoot --backupID monday --force \
     --dryRun


List all of the incremental backups in 'backups/userRoot' folder that use the backup 'monday' as a base, but do not actually remove any backups:
remove-backup --backupDirectory backups/userRoot --backupID monday \
     --showDependencies


Remove all but the most recent five backups in the 'backups/userRoot' directory:
remove-backup --backupDirectory backups/userRoot --retainFullBackupCount 5


Remove all backups created more than one week ago from the 'backups/userRoot' directory:
remove-backup --backupDirectory backups/userRoot --retainFullBackupAge "1 week"

Arguments

-V
--version

Description Display PingAuthorize Server version information

-H
--help

Description Display general usage information

--help-debug

Description Display help for using debug options
Advanced Yes

-d {backupDir}
--backupDirectory {backupDir}

Description Directory containing backup archives and backup descriptor for a given backend
Required Yes
Multi-Valued No

-I {backupID}
--backupID {backupID}

Description Identifier of the backup archive to remove. This argument cannot be used in conjunction with either the --retainFullBackupCount or --retainFullBackupAge arguments
Required No
Multi-Valued No

-f
--force

Description Force the removal of this backup, even if there are one or more other backups that depend on it. If this argument is provided, then the target backup and all of its dependent backups will be removed. If this argument is not provided, then the attempt to delete the target backup will fail if any backups depend on that backup. This argument cannot be used in conjunction with either the --retainFullBackupCount or --retainFullBackupAge arguments, as those arguments will automatically cause dependent backups to be removed along with the full backups that match their criteria

-s
--showDependencies

Description Show the incremental backups that depend on this backup, but do not remove any backups. No backups will be removed. This argument cannot be used in conjunction with either the --retainFullBackupCount or --retainFullBackupAge arguments

--retainFullBackupCount {count}

Description The number of full backups that should be retained. If the backup directory contains more than this number of full backups, then the oldest full backups will be removed, along with any associated incremental backups, so that only the specified number of the most recent full backups will be retained. A value of zero indicates that all backups should be removed and only the new backup should be left in the backup directory. If the backup directory contains fewer than the specified number of full backups, then no backups will be removed. If both the --retainFullBackupCount and --retainFullBackupAge arguments are provided, then only backups that satisfy the conditions for both arguments will be eligible for removal. This argument cannot be used in conjunction with the --backupID, --force, or --showDependencies arguments
Lower Bound 0
Required No
Multi-Valued No

--retainFullBackupAge {age}

Description The minimum age of full backups in the backup directory that should be retained. Values should be specified as an integer followed by a time unit (for example, '8 hours', '3 days', or '1 week"). If any full backups are removed, then all incremental backups associated with those full backups will also be removed. If the backup directory does not contain any full backups older than the specified age, then no backups will be removed. If both the --retainFullBackupCount and --retainFullBackupAge arguments are provided, then only backups that are outside the retain criteria for both arguments will be eligible for removal. This argument cannot be used in conjunction with either the --backupID, --force, or --showDependencies arguments
Required No
Multi-Valued No

-n
--dryRun

Description Describe the processing that would be performed, but do not actually remove any backups