Set group_by for restic in host-backup

This commit is contained in:
Tobias Reisinger 2023-12-19 18:36:48 +01:00
parent 0eed077cc2
commit d173de93ba
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
2 changed files with 7 additions and 2 deletions

View file

@ -21,7 +21,12 @@ fi
case "$1" in
"_forget")
host-backup forget --prune --keep-last 7 --keep-daily 14 --keep-weekly 8 --keep-monthly 8 --keep-yearly 2
host-backup forget --prune --group-by "host" \
--keep-last 7 \
--keep-daily 14 \
--keep-weekly 12 \
--keep-monthly 12 \
--keep-yearly 2
;;
*)
restic "$@"

View file

@ -7,6 +7,6 @@ log_dir="$HOME/.cache/logs"
if [ -d "$log_dir" ]
then
echo "Cleaning old logs..."
find "$log_dir" -type f -mtime +7 -print -delete
find "$log_dir" -type f -mtime +3 -print -delete
find "$log_dir" -type f -mtime +1 -size -25k -print -delete
fi