diff --git a/beat/web/utils/management/commands/backup.py b/beat/web/utils/management/commands/backup.py index 749e1dc4e07b1d627a274f648730e2aee6bba4ae..5df5374de3f12f0717224eeeb5227b3050d53061 100644 --- a/beat/web/utils/management/commands/backup.py +++ b/beat/web/utils/management/commands/backup.py @@ -59,6 +59,7 @@ APPS = [ #dump and load order are respected 'search', 'reports', 'actstream', + 'post_office', ] diff --git a/beat/web/utils/management/commands/restore.py b/beat/web/utils/management/commands/restore.py index 1efcf29f2f2b1fe5794501c209881d2414d15e5c..e743eb4b1b9269e119aadb66fc1553336f5c6e70 100644 --- a/beat/web/utils/management/commands/restore.py +++ b/beat/web/utils/management/commands/restore.py @@ -74,6 +74,10 @@ class Command(BaseCommand): def add_arguments(self, parser): + parser.add_argument('-e', '--exclude', dest='exclude', action='append', + default=[], help='An app_label to exclude (use multiple ' \ + '--exclude to exclude multiple apps).') + parser.add_argument('backup', type=str, help='The backup you wish to restore from') @@ -115,6 +119,7 @@ class Command(BaseCommand): # and loads the apps respecting the imposed order for app in APPS: + if app in arguments.get('exclude'): continue # copy prefix data path = os.path.join(settings.PREFIX, app) srcdir = os.path.join(tmpdir, 'prefix', app)