Stefan's Website

about me projects tech talk brick movies
projects > opensand >

OpenSANd Housekeeping

12 Jan 2015

Starting with version 0.8.0, housekeeping (deleting old backups, zipping backup chunks) is separated from the backup process. A new command 'housekeeping' has been introduced that takes two parameters:

  • the retention size (number of backups to keep)
  • the archive size (in MB; the number of MB to free by zipping backup chunks)

The housekeeping process needs to be run on the OpenSAN host (not the backup host), usually by root or any other user that has access to oscontrol.

Crontab Example

The housekeeping process should be started periodically by cron. A crontab entry that does backups at noon and midnight every workday plus a housekeeping run during the weeking looks like this:

# this is the crontab file
# use 'crontab -e' in order to edit
0 0 * * 1-5 /usr/sbin/oscontrol runbackup
0 12 * * 1-5 /usr/sbin/oscontrol runbackup
0 1 * * 6 /usr/sbin/oscontrol housekeeping 100 30000

Shell Example

Housekeeping can also be started manually, if needed.

Keep 100 backups, try freeing 10000 MB of disk space by zipping old backups:

$ oscontrol housekeeping 100 10000