Merge pull request #551 from modoboa/feature/backup-wo-mail
Added skipping mail backup in backup process
This commit is contained in:
14
README.rst
14
README.rst
@@ -107,7 +107,19 @@ You can start the process as follows::
|
|||||||
|
|
||||||
Then follow the step on the console.
|
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
|
1. Silent mode
|
||||||
|
|
||||||
|
|||||||
6
run.py
6
run.py
@@ -120,6 +120,9 @@ def backup_system(config, args):
|
|||||||
utils.copy_file(args.configfile, backup_path)
|
utils.copy_file(args.configfile, backup_path)
|
||||||
# Backup applications
|
# Backup applications
|
||||||
for app in PRIMARY_APPS:
|
for app in PRIMARY_APPS:
|
||||||
|
if app == "dovecot" and args.no_mail:
|
||||||
|
utils.printcolor("Skipping mail backup", utils.BLUE)
|
||||||
|
continue
|
||||||
scripts.backup(app, config, backup_path)
|
scripts.backup(app, config, backup_path)
|
||||||
|
|
||||||
|
|
||||||
@@ -171,6 +174,9 @@ def main(input_args):
|
|||||||
help="For script usage, do not require user interaction "
|
help="For script usage, do not require user interaction "
|
||||||
"backup will be saved at ./modoboa_backup/Backup_M_Y_d_H_M "
|
"backup will be saved at ./modoboa_backup/Backup_M_Y_d_H_M "
|
||||||
"if --backup-path is not provided")
|
"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(
|
parser.add_argument(
|
||||||
"--restore", type=str, metavar="path",
|
"--restore", type=str, metavar="path",
|
||||||
help="Restore a previously backup up modoboa instance on a NEW machine. "
|
help="Restore a previously backup up modoboa instance on a NEW machine. "
|
||||||
|
|||||||
Reference in New Issue
Block a user