krebs.backup: use dedicated .backup-filter

This commit is contained in:
tv 2022-01-05 02:54:53 +01:00
parent c4ff9f0d26
commit 63e76e4218

View File

@ -157,7 +157,8 @@ let
# of the deepest directory: # of the deepest directory:
# shellcheck disable=SC2174 # shellcheck disable=SC2174
${local.rsync} >&2 \ ${local.rsync} >&2 \
-aAXF --delete \ -aAX --delete \
--filter='dir-merge /.backup-filter' \
--rsh=${shell.escape ssh} \ --rsh=${shell.escape ssh} \
--rsync-path=${shell.escape remote.rsync} \ --rsync-path=${shell.escape remote.rsync} \
--link-dest=${shell.escape plan.dst.path}/current \ --link-dest=${shell.escape plan.dst.path}/current \
@ -191,7 +192,8 @@ let
echo >&2 "create snapshot: $ns/$name" echo >&2 "create snapshot: $ns/$name"
mkdir -m 0700 -p "$dst_path/$ns" mkdir -m 0700 -p "$dst_path/$ns"
rsync >&2 \ rsync >&2 \
-aAXF --delete \ -aAX --delete \
--filter='dir-merge /.backup-filter' \
--link-dest="$dst_path/current" \ --link-dest="$dst_path/current" \
"$dst_path/current/" \ "$dst_path/current/" \
"$dst_path/$ns/.partial.$name" "$dst_path/$ns/.partial.$name"