diff --git a/README.rst b/README.rst index c9b0917..4c8a9e7 100644 --- a/README.rst +++ b/README.rst @@ -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 + +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" + +if you want to disable mail backup:: + + $ sudo ./run.py --backup --no-mail + +This can be useful for larger instance 1. Silent mode diff --git a/run.py b/run.py index 78b9877..c71ba21 100755 --- a/run.py +++ b/run.py @@ -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. "