Added skipping mail backup in backup process

This commit is contained in:
Spitfireap
2024-04-26 11:21:36 +02:00
parent 7066c2b86c
commit 6fe80b5ea3
2 changed files with 18 additions and 1 deletions

View File

@@ -107,7 +107,19 @@ You can start the process as follows::
Then follow the step on the console.
There is also a non-interactive mode:
There is also a non-interactive mode::
$ sudo ./run.py --silent-backup <your domain>
You can also add a path, else it will be saved in ./modoboa_backup/Backup_M_Y_d_H_M::
$ sudo ./run.py --silent-backup --backup-path "/My_Backup_Path" <your domain>
if you want to disable mail backup::
$ sudo ./run.py --backup --no-mail <your domain>
This can be useful for larger instance
1. Silent mode

5
run.py
View File

@@ -120,6 +120,8 @@ def backup_system(config, args):
utils.copy_file(args.configfile, backup_path)
# Backup applications
for app in PRIMARY_APPS:
if app == "dovecot" and args.no_mail:
utils.printcolor("Skipping mail backup", utils.BLUE)
scripts.backup(app, config, backup_path)
@@ -171,6 +173,9 @@ def main(input_args):
help="For script usage, do not require user interaction "
"backup will be saved at ./modoboa_backup/Backup_M_Y_d_H_M "
"if --backup-path is not provided")
parser.add_argument(
"--no-mail", action="store_true", default=False,
help="Disable mail backup (save space)")
parser.add_argument(
"--restore", type=str, metavar="path",
help="Restore a previously backup up modoboa instance on a NEW machine. "