Obnam
From Attie's Wiki
(Difference between revisions)
m (→Forgetting) |
m (→Forgetting) |
||
Line 23: | Line 23: | ||
obnam -r sftp://${REPO_HOST}/${REPO_PATH} forget --keep=168h,30d,24w,24m,10y | obnam -r sftp://${REPO_HOST}/${REPO_PATH} forget --keep=168h,30d,24w,24m,10y | ||
</source> | </source> | ||
+ | |||
+ | Note, that obnam only considers a time period that contains a backup... | ||
+ | If you are using daily backups, and specify 168h,30d then obnam will actually keep one backup for each of the first 168 days...? | ||
+ | [https://linux.die.net/man/1/obnam More in the man page] |
Latest revision as of 11:37, 10 July 2017
[edit] Command Reference
REPO_HOST=me@repo REPO_PATH=~/my_files BACKUP_DIR=/home/me/ obnam -r sftp://${REPO_HOST}/${REPO_PATH} --compress-with=deflate backup --deduplicate=verify --root=${BACKUP_DIR} obnam -r sftp://${REPO_HOST}/${REPO_PATH} --compress-with=deflate generations obnam -r sftp://${REPO_HOST}/${REPO_PATH} --compress-with=deflate fsck obnam -r sftp://${REPO_HOST}/${REPO_PATH} --compress-with=deflate clients obnam -r sftp://${REPO_HOST}/${REPO_PATH} restore
[edit] Forgetting
The following (if I've understood correctly), will keep generations using the following policy:
- Hourly, for the last 7 days
- Daily, for the last 30 days
- Weekly, for the last 24 weeks (~6 months)
- Monthly, for the last 24 months (2 years)
- Yearly, for the last 10 years
obnam -r sftp://${REPO_HOST}/${REPO_PATH} forget --keep=168h,30d,24w,24m,10y
Note, that obnam only considers a time period that contains a backup... If you are using daily backups, and specify 168h,30d then obnam will actually keep one backup for each of the first 168 days...? More in the man page