Set group_by for restic in host-backup
This commit is contained in:
parent
0eed077cc2
commit
d173de93ba
2 changed files with 7 additions and 2 deletions
|
@ -21,7 +21,12 @@ fi
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"_forget")
|
"_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 "$@"
|
restic "$@"
|
||||||
|
|
|
@ -7,6 +7,6 @@ log_dir="$HOME/.cache/logs"
|
||||||
if [ -d "$log_dir" ]
|
if [ -d "$log_dir" ]
|
||||||
then
|
then
|
||||||
echo "Cleaning old logs..."
|
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
|
find "$log_dir" -type f -mtime +1 -size -25k -print -delete
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue