There was an error while loading. Please reload this page.
2 parents 4c5298e + 1d64d3e commit 6b8a06fCopy full SHA for 6b8a06f
1 file changed
vackup
@@ -174,10 +174,12 @@ cmd_export() {
174
FILE_NAME=$(basename "$FILE_NAME")
175
176
if ! docker run --rm \
177
+ -e FILE_NAME="$FILE_NAME" \
178
+ -e OWNER="${OWNER:-"$(id -u):$(id -g)"}" \
179
-v "$VOLUME_NAME":/volume-data \
180
-v "$DIRECTORY":/mount-volume \
181
busybox \
- /bin/sh -c 'tar -cvzf /mount-volume/'"'$FILE_NAME'"' -C /volume-data . && chown '"'${OWNER:-"$(id -u):$(id -g)"}'"' /mount-volume/'"'$FILE_NAME'";
182
+ /bin/sh -c 'tar -cvzf /mount-volume/"$FILE_NAME" -C /volume-data . && (chown "$OWNER" /mount-volume/"$FILE_NAME" || echo 1>&2 "Warning: Failed to change ownership of the $FILE_NAME file")';
183
then
184
error 'Failed to start busybox backup container'
185
fi
0 commit comments