Preserve host destinations and zstd options

This commit is contained in:
Codex authored and howard committed 2026-09-20 21:40:30 +12:00
1 parent 261e88f5dc
commit e27387bd93
5 files changed
+17 -4

No files matched your search

+4 -2
View File
@@ -17,8 +17,10 @@ if ! is_true "$RCLONE_ENABLED" && (( FORCE == 0 )); then log SKIP "rclone method
require_command rclone
[[ -d "$BACKUP_ROOT" ]] || die "Backup root not found: $BACKUP_ROOT"
read -r -a extra_args <<<"$RCLONE_EXTRA_ARGS"
args=(copy "$BACKUP_ROOT" "${RCLONE_REMOTE%/}/$BACKUP_HOSTNAME" "${extra_args[@]}")
destination="${RCLONE_REMOTE%/}"
is_true "$RCLONE_HOST_SUBDIR" && destination="$destination/$BACKUP_HOSTNAME"
args=(copy "$BACKUP_ROOT" "$destination" "${extra_args[@]}")
(( DRY_RUN )) && args+=(--dry-run)
log INFO "Copying backups to ${RCLONE_REMOTE%/}/$BACKUP_HOSTNAME"
log INFO "Copying backups to $destination"
rclone "${args[@]}"
log DONE "rclone backup method completed"