From 3449bae49164625a6b388fff4d794db37e5ac5ad Mon Sep 17 00:00:00 2001 From: redxef Date: Sun, 16 Aug 2020 16:39:29 +0200 Subject: [PATCH] Fixed owners, again... --- dvbackup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dvbackup.sh b/dvbackup.sh index ac2436b..c42af0f 100755 --- a/dvbackup.sh +++ b/dvbackup.sh @@ -15,7 +15,7 @@ backup() { test -z "$target_name" && { echo "Error: No target name found for target=$target" >&2; exit 3; } set -x - docker run --rm --user="$(id -u):$(id -g)" --mount="type=volume,source=$volume,destination=/data,ro=true" --mount="type=bind,source=$target_dir,destination=/data2" busybox /bin/sh -c "tar cvf '/data2/$target_name' /data && chown $(id -u):$(id -g) /data2/$target_name" + docker run --rm --mount="type=volume,source=$volume,destination=/data,ro=true" --mount="type=bind,source=$target_dir,destination=/data2" busybox /bin/sh -c "tar cvf '/data2/$target_name' /data && chown $(id -u):$(id -g) /data2/$target_name" set +x } @@ -34,7 +34,7 @@ restore() { test -z "$target_name" && { echo "Error: No target name found for target=$target" >&2; exit 3; } set -x - docker run --rm --user="$(id -u):$(id -g)" --mount="type=volume,source=$volume,destination=/data" --mount="type=bind,source=$target_dir,destination=/data2" busybox /bin/sh -c "rm -rf /data/* && cd / && tar xvf '/data2/$target_name'" + docker run --rm --mount="type=volume,source=$volume,destination=/data" --mount="type=bind,source=$target_dir,destination=/data2" busybox /bin/sh -c "rm -rf /data/* && cd / && tar xvf '/data2/$target_name'" set +x }