Merge claude/2
This commit is contained in:
commit
3d7fc0a3f6
@ -78,6 +78,13 @@ backupFilesCapture()
|
|||||||
mkdir -p "$stage"
|
mkdir -p "$stage"
|
||||||
# Read in the container's namespace, write the plain tree to staging.
|
# Read in the container's namespace, write the plain tree to staging.
|
||||||
if docker exec "$container" tar -C "$cpath" -cf - . 2>/dev/null | tar -xf - -C "$stage" 2>/dev/null; then
|
if docker exec "$container" tar -C "$cpath" -cf - . 2>/dev/null | tar -xf - -C "$stage" 2>/dev/null; then
|
||||||
|
# The capture preserves the app's ownership (e.g. www-data, 0640),
|
||||||
|
# which the backup user still couldn't read. Hand the staging tree to
|
||||||
|
# the backup user so restic can read it; modes are unchanged, so the
|
||||||
|
# owner can now read everything. Real ownership is reapplied from the
|
||||||
|
# descriptor on restore.
|
||||||
|
chown -R "$docker_install_user":"$docker_install_user" "$stage" 2>/dev/null \
|
||||||
|
|| sudo chown -R "$docker_install_user":"$docker_install_user" "$stage" 2>/dev/null
|
||||||
isSuccessful "captured $subdir ($(du -sh "$stage" 2>/dev/null | cut -f1))"
|
isSuccessful "captured $subdir ($(du -sh "$stage" 2>/dev/null | cut -f1))"
|
||||||
else
|
else
|
||||||
isError "capture of $subdir from $container failed"
|
isError "capture of $subdir from $container failed"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user