(bugfix) Guard dry-run logs and recursive rsync defaults
Clear the reused dry-run rsync log before each dry-run so run details only show output from the current execution. Populate new Django global configs with the existing safe rsync and exclude defaults, including archive mode and standard pseudo-filesystem exclusions. Add a host check that fails when effective rsync args do not include archive or recursive transfer, preventing real backups that only report "skipping directory .".
This commit is contained in:
@@ -13,6 +13,7 @@ from django.shortcuts import get_object_or_404, redirect, render
|
||||
from django.views.decorators.http import require_POST
|
||||
|
||||
from pobsync.errors import PobsyncError
|
||||
from pobsync.config.defaults import DEFAULT_EXCLUDES, DEFAULT_RSYNC_ARGS
|
||||
|
||||
from .backup_runner import queue_backup_run
|
||||
from .forms import (
|
||||
@@ -519,7 +520,9 @@ def _default_global_initial() -> dict[str, object]:
|
||||
"ssh_user": "root",
|
||||
"ssh_port": 22,
|
||||
"rsync_binary": "rsync",
|
||||
"rsync_args": DEFAULT_RSYNC_ARGS,
|
||||
"default_source_root": "/",
|
||||
"excludes_default": DEFAULT_EXCLUDES,
|
||||
"retention_daily": 14,
|
||||
"retention_weekly": 8,
|
||||
"retention_monthly": 12,
|
||||
|
||||
Reference in New Issue
Block a user