(refactor) make Docker backup root static in Django setup
Remove backup_root from the normal Django global config form and display the fixed container path /backups instead. Always persist /backups from the setup form so Docker deployments do not mix host paths with container paths. Update tests and docs to clarify that the host backup directory is chosen through the Docker mount, while Django always uses /backups internally.
This commit is contained in:
@@ -4,6 +4,7 @@ import json
|
||||
|
||||
from django.contrib import messages
|
||||
from django.contrib.admin.views.decorators import staff_member_required
|
||||
from django.conf import settings
|
||||
from django.db.models import Count
|
||||
from django.shortcuts import get_object_or_404, redirect, render
|
||||
from django.views.decorators.http import require_POST
|
||||
@@ -60,6 +61,7 @@ def edit_global_config(request):
|
||||
{
|
||||
"global_config": global_config,
|
||||
"form": form,
|
||||
"backup_root": settings.POBSYNC_BACKUP_ROOT,
|
||||
},
|
||||
)
|
||||
|
||||
@@ -264,7 +266,6 @@ def _default_schedule_initial() -> dict[str, object]:
|
||||
def _default_global_initial() -> dict[str, object]:
|
||||
return {
|
||||
"name": "default",
|
||||
"backup_root": "/backups",
|
||||
"ssh_user": "root",
|
||||
"ssh_port": 22,
|
||||
"rsync_binary": "rsync",
|
||||
|
||||
Reference in New Issue
Block a user