Merge branch 'refactor/backups' into refactor/upload-api

This commit is contained in:
amcmanu3 2024-06-13 16:17:49 -04:00
commit 038a280ae1
3 changed files with 4 additions and 6 deletions

View File

@ -208,7 +208,7 @@ class ManagementController:
def add_default_backup_config(self, server_id, backup_path):
return self.management_helper.add_backup_config(
{
"backup_name": "afdgahah",
"backup_name": "Default Backup",
"backup_location": Helpers.wtol_path(backup_path),
"max_backups": 0,
"before": "",
@ -217,6 +217,7 @@ class ManagementController:
"shutdown": False,
"server_id": server_id,
"excluded_dirs": [],
"default": True,
}
)

View File

@ -1150,10 +1150,7 @@ class ServerInstance:
)
time.sleep(3)
conf = HelpersManagement.get_backup_config(backup_id)
conf["backup_location"] = os.path.join(
conf["backup_location"], conf["backup_id"]
)
backup_location = conf["backup_location"]
backup_location = os.path.join(conf["backup_location"], conf["backup_id"])
if not backup_location:
Console.critical("No backup path found. Canceling")
return None

View File

@ -8,7 +8,7 @@ import logging
from app.classes.models.management import Backups, Schedules
from app.classes.shared.helpers import Helpers
from app.classes.shared.console import Console
from app.classes.shared.migration import Migrator, MigrateHistory
from app.classes.shared.migration import Migrator
from app.classes.shared.file_helpers import FileHelpers
logger = logging.getLogger(__name__)