- docker_run: in rooted mode run docker AS the manager via the docker group (no sudo); the type=='sudo' branch was unreachable dead code - 8 db helpers: fix 'command -v sudo sqlite3' guard to 'command -v sqlite3' (bodies already query via runInstallOp) - restic/kopia single-file dump: write target_file via runBackupOp tee (as the backup user, matching the snapshot-restore path) instead of root tee - adguard auth: root-owned scratch via runSystem mktemp Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: librelad <librelad@digitalangels.vip>
21 lines
440 B
Bash
21 lines
440 B
Bash
#!/bin/bash
|
|
|
|
resticDumpFile()
|
|
{
|
|
local idx="$1"
|
|
local snapshot_id="$2"
|
|
local file_path="$3"
|
|
local target_file="$4"
|
|
|
|
resticEnvExport "$idx" || return 1
|
|
|
|
if [[ -n "$target_file" ]]; then
|
|
runBackupOp restic dump "$snapshot_id" "$file_path" | runBackupOp tee "$target_file" >/dev/null
|
|
else
|
|
runBackupOp restic dump "$snapshot_id" "$file_path"
|
|
fi
|
|
local rc=$?
|
|
resticEnvUnset
|
|
return $rc
|
|
}
|