Fixed owners, again...
This commit is contained in:
parent
f9ab41c4b8
commit
3449bae491
1 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ backup() {
|
||||||
test -z "$target_name" && { echo "Error: No target name found for target=$target" >&2; exit 3; }
|
test -z "$target_name" && { echo "Error: No target name found for target=$target" >&2; exit 3; }
|
||||||
|
|
||||||
set -x
|
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
|
set +x
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ restore() {
|
||||||
test -z "$target_name" && { echo "Error: No target name found for target=$target" >&2; exit 3; }
|
test -z "$target_name" && { echo "Error: No target name found for target=$target" >&2; exit 3; }
|
||||||
|
|
||||||
set -x
|
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
|
set +x
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue