(feature) Add optional verbose rsync output for manual backups
Expose a verbose rsync output option in the Django manual backup form and store the selected value with the queued run request. Propagate the option through the worker, direct management command, and rsync command builder so real backups can emit itemized changes, file-list progress, and stats when requested. Dry-runs continue to use verbose output by default and report that consistently in requested options. Cover the queue, worker, view, and rsync command behavior with focused tests.
This commit is contained in:
@@ -18,6 +18,7 @@ def queue_backup_run(
|
||||
host: HostConfig,
|
||||
run_type: str = BackupRun.RunType.MANUAL,
|
||||
dry_run: bool = False,
|
||||
verbose_output: bool = False,
|
||||
prune: bool = False,
|
||||
prune_max_delete: int = 10,
|
||||
prune_protect_bases: bool = False,
|
||||
@@ -29,6 +30,7 @@ def queue_backup_run(
|
||||
result={
|
||||
"requested": {
|
||||
"dry_run": bool(dry_run),
|
||||
"verbose_output": bool(dry_run or verbose_output),
|
||||
"prune": bool(prune),
|
||||
"prune_max_delete": int(prune_max_delete),
|
||||
"prune_protect_bases": bool(prune_protect_bases),
|
||||
@@ -42,6 +44,7 @@ def execute_backup_run(
|
||||
run: BackupRun,
|
||||
prefix: Path,
|
||||
dry_run: bool = False,
|
||||
verbose_output: bool = False,
|
||||
prune: bool = False,
|
||||
prune_max_delete: int = 10,
|
||||
prune_protect_bases: bool = False,
|
||||
@@ -60,6 +63,7 @@ def execute_backup_run(
|
||||
config_source=DjangoConfigSource(),
|
||||
run_id=run.id,
|
||||
cancel_check=lambda: _run_cancel_requested(run.id),
|
||||
verbose_output=bool(dry_run or verbose_output),
|
||||
)
|
||||
except Exception as exc:
|
||||
run.refresh_from_db()
|
||||
|
||||
Reference in New Issue
Block a user