Skip to content

Commit

Permalink
Add --fake-super to allow ci-storage to be run as root in the source …
Browse files Browse the repository at this point in the history
…machine and still backup/restore files owners correctly, even though it doesn't have root access on destination
  • Loading branch information
dimikot committed Oct 5, 2024
1 parent 8c3ae16 commit c31e324
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions ci-storage
Original file line number Diff line number Diff line change
Expand Up @@ -492,11 +492,15 @@ def cmd_to_debug_str(
cmd: list[str],
) -> str:
inv = dict((v, k) for k, v in SCRIPTS.items())
return shlex.join(
[
f"<{inv[arg]}>" if arg in inv else arg.rstrip().replace("\n", "\\n")
for arg in cmd
]
return re.sub(
r" '(--[^=]+=)",
r" \1'",
shlex.join(
[
f"<{inv[arg]}>" if arg in inv else arg.rstrip().replace("\n", "\\n")
for arg in cmd
]
),
)


Expand Down Expand Up @@ -561,6 +565,7 @@ def build_rsync_args(
)
return [
*(["-e", shlex.join(build_ssh_cmd(port=port))] if host else []),
"--rsync-path=rsync --fake-super",
"-a",
"--partial",
"--stats",
Expand Down

0 comments on commit c31e324

Please sign in to comment.