Question


How do I remove zombie backups?

OnApp Backup Scheme


Normal and/or Incremental Backups

Answer


  1. Copy or download zbk.sh onto the control panel server:
#rm -f /tmp/zbk.sh
#wget https://www.dropbox.com/s/9tnj1dh22k9285q/zbk.sh?dl=1 -q --no-check-certificate -O /tmp/zbk.sh; cd /tmp/
CODE

2. Run the following command: 

#bash zbk.sh -B 137.137.137.137
CODE

Where:

137.137.137.137 - the IP address of the backup server.

This would search for backup files that exist on the backup server but do not exist in the OnApp database. The script will list the files with a prompt asking you to confirm if it is ok to delete them. Check that every line in the output looks like a backup. Then you can type 'y' to delete the items found in that list.

After the script finishes, a list of deleted zombie backups should be in removed_backups.txt

Additional Info


You can check for zombie backup transactions using the -p option.

You can check for missing backup files using the -M option.

The script can also be used to check for zombie backups on a compute resource, (use -H [ipaddress]) and on the control panel.  (Use -C, no argument/parameter required)

bash zbk.sh -h should display a help message with this information as well.