Skip to content

Commit

Permalink
Added skipping mail backup in backup process
Browse files Browse the repository at this point in the history
  • Loading branch information
Spitfireap committed Apr 26, 2024
1 parent 7066c2b commit 6fe80b5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down Expand Up @@ -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. "
Expand Down

0 comments on commit 6fe80b5

Please sign in to comment.