Expiration example (run both) :
- backshift --save-directory /backshift-production/save-directory --expire
- find /backshift-production/save-directory/chunks -depth -mindepth 2 -type d -empty -mtime +60 -print0 | xargs -0 --no-run-if-empty rmdir
Notes
- The first time you run an expire, it'll ask you how long you want to keep a given file in the backshift repository. You currently must
enter the time to keep files, in units of seconds. The author likes to use 1 year, which is about 31556925 seconds.
- backshift-expire is deprecated. Please use backshift --expire instead.
- The find | xargs removes old, empty chunk directories - specifically those that haven't been modified in over 60 days.
If you ever need to keep a single host's (or filesystem's) backup data longer than the retention interval allows, you can
do one of the following:
- do a restore of the data you need to keep as a tar archive, optionally extracting it to another hierarchy
- if you cannot lose the full history:
- rsync the entire repo to another directory hierarchy
- change the retention interval for the entire repo - temporarily or permanently. This is a number of seconds in
<repopath>/overall/maximum-age
- turn off your expiration cronjob (or turn it off in your similar scheduling tool)