Change forget resolution to 30d
Restic is really annoying with its retention arguments, not really allowing what I want, so this is the easiest way to get decent retention.
This commit is contained in:
parent
0a8167c839
commit
d70f450e2d
1 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ export RESTIC_REPOSITORY="b2:{{ restic_b2_bucket }}"
|
||||||
export RESTIC_LOG_DIR="$HOME/log"
|
export RESTIC_LOG_DIR="$HOME/log"
|
||||||
export RESTIC_LOG_FILE="$RESTIC_LOG_DIR/$1-$(date -Iseconds).log"
|
export RESTIC_LOG_FILE="$RESTIC_LOG_DIR/$1-$(date -Iseconds).log"
|
||||||
|
|
||||||
export FORGET_OPTIONS="--keep-daily 7 --keep-weekly 2"
|
export FORGET_OPTIONS="--keep-daily 30"
|
||||||
|
|
||||||
mkdir -p "$RESTIC_LOG_DIR"
|
mkdir -p "$RESTIC_LOG_DIR"
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ cron_forget() {
|
||||||
# Forget legacy snapshots
|
# Forget legacy snapshots
|
||||||
forget() {
|
forget() {
|
||||||
set -x
|
set -x
|
||||||
restic forget --keep-daily 7 --keep-weekly 2 $@
|
restic forget $FORGET_OPTIONS $@
|
||||||
}
|
}
|
||||||
|
|
||||||
# Prune orphaned files
|
# Prune orphaned files
|
||||||
|
|
Loading…
Reference in a new issue