nix/os/containers/backup: add gargabe-collection
This adds instructions to remove all older backups.
This commit is contained in:
parent
ebe3167f5b
commit
1b36ecea3d
1 changed files with 7 additions and 0 deletions
|
@ -139,6 +139,13 @@ in args // {
|
|||
done
|
||||
sync
|
||||
echo Finished rdup/rdedup backup...
|
||||
|
||||
echo Removing all previous backups...
|
||||
rdedup --dir=${bkpDestination}/rdedup list | grep -v ''${TIMESTAMP} | xargs echo rdedup --dir=${bkpDestination}/rdedup remove
|
||||
|
||||
echo Running rdedup garbage-collector...
|
||||
time rdedup -v -ttt --dir=${bkpDestination}/rdedup gc
|
||||
|
||||
echo Determining backup destination size ${bkpDestination}/rdedup...
|
||||
du -hs ${bkpDestination}/rdedup
|
||||
'';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue