Merge pull request #22 from toddejohnson/forget-prune
Forget now has --prune which might be more efficent.
This commit is contained in:
@@ -65,12 +65,14 @@ restic backup \
|
||||
$BACKUP_PATHS &
|
||||
wait $!
|
||||
|
||||
# Dereference old backups.
|
||||
# Dereference and delete/prune old backups.
|
||||
# See restic-forget(1) or http://restic.readthedocs.io/en/latest/060_forget.html
|
||||
# --group-by only the tag and path, and not by hostname. This is because I create a B2 Bucket per host, and if this hostname accidentially change some time, there would now be multiple backup sets.
|
||||
restic forget \
|
||||
--verbose \
|
||||
--tag $BACKUP_TAG \
|
||||
--option b2.connections=$B2_CONNECTIONS \
|
||||
--prune \
|
||||
--group-by "paths,tags" \
|
||||
--keep-daily $RETENTION_DAYS \
|
||||
--keep-weekly $RETENTION_WEEKS \
|
||||
@@ -78,13 +80,6 @@ restic forget \
|
||||
--keep-yearly $RETENTION_YEARS &
|
||||
wait $!
|
||||
|
||||
# Remove old data not linked anymore.
|
||||
# See restic-prune(1) or http://restic.readthedocs.io/en/latest/060_forget.html
|
||||
restic prune \
|
||||
--option b2.connections=$B2_CONNECTIONS \
|
||||
--verbose &
|
||||
wait $!
|
||||
|
||||
# Check repository for errors.
|
||||
# NOTE this takes much time (and data transfer from remote repo?), do this in a separate systemd.timer which is run less often.
|
||||
#restic check &
|
||||
|
||||
Reference in New Issue
Block a user