Alway create the backup directory
This commit is contained in:
@@ -173,6 +173,7 @@ class Installer:
|
||||
if self.with_db:
|
||||
self._dump_database(path)
|
||||
custom_backup_path = os.path.join(path, "custom", self.appname)
|
||||
utils.mkdir_safe(custom_backup_path)
|
||||
self.custom_backup(custom_backup_path)
|
||||
|
||||
def custom_backup(self, path):
|
||||
|
||||
@@ -135,5 +135,7 @@ class Opendkim(base.Installer):
|
||||
def custom_backup(self, path):
|
||||
"""Backup DKIM keys."""
|
||||
if os.path.isdir(self.app_config["keys_storage_dir"]):
|
||||
shutil.copytree(self.app_config["keys_storage_dir"], path)
|
||||
shutil.copytree(
|
||||
self.app_config["keys_storage_dir"], path, dirs_exist_ok=True
|
||||
)
|
||||
utils.printcolor("DKIM keys saved!", utils.GREEN)
|
||||
|
||||
Reference in New Issue
Block a user