mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Merge branch 'refactor/backups' into refactor/upload-api
This commit is contained in:
commit
038a280ae1
@ -208,7 +208,7 @@ class ManagementController:
|
|||||||
def add_default_backup_config(self, server_id, backup_path):
|
def add_default_backup_config(self, server_id, backup_path):
|
||||||
return self.management_helper.add_backup_config(
|
return self.management_helper.add_backup_config(
|
||||||
{
|
{
|
||||||
"backup_name": "afdgahah",
|
"backup_name": "Default Backup",
|
||||||
"backup_location": Helpers.wtol_path(backup_path),
|
"backup_location": Helpers.wtol_path(backup_path),
|
||||||
"max_backups": 0,
|
"max_backups": 0,
|
||||||
"before": "",
|
"before": "",
|
||||||
@ -217,6 +217,7 @@ class ManagementController:
|
|||||||
"shutdown": False,
|
"shutdown": False,
|
||||||
"server_id": server_id,
|
"server_id": server_id,
|
||||||
"excluded_dirs": [],
|
"excluded_dirs": [],
|
||||||
|
"default": True,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1150,10 +1150,7 @@ class ServerInstance:
|
|||||||
)
|
)
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
conf = HelpersManagement.get_backup_config(backup_id)
|
conf = HelpersManagement.get_backup_config(backup_id)
|
||||||
conf["backup_location"] = os.path.join(
|
backup_location = os.path.join(conf["backup_location"], conf["backup_id"])
|
||||||
conf["backup_location"], conf["backup_id"]
|
|
||||||
)
|
|
||||||
backup_location = conf["backup_location"]
|
|
||||||
if not backup_location:
|
if not backup_location:
|
||||||
Console.critical("No backup path found. Canceling")
|
Console.critical("No backup path found. Canceling")
|
||||||
return None
|
return None
|
||||||
|
@ -8,7 +8,7 @@ import logging
|
|||||||
from app.classes.models.management import Backups, Schedules
|
from app.classes.models.management import Backups, Schedules
|
||||||
from app.classes.shared.helpers import Helpers
|
from app.classes.shared.helpers import Helpers
|
||||||
from app.classes.shared.console import Console
|
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
|
from app.classes.shared.file_helpers import FileHelpers
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
Loading…
Reference in New Issue
Block a user