[c-c restore] drop useless restore-all option, and related systemonly argument
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 21 Jun 2013 16:17:17 +0200
changeset 9457 d5ed6efd6448
parent 9456 a79e88aad555
child 9458 e2dfdd313dfe
[c-c restore] drop useless restore-all option, and related systemonly argument
server/migractions.py
server/serverctl.py
--- a/server/migractions.py	Fri Jun 21 16:01:59 2013 +0200
+++ b/server/migractions.py	Fri Jun 21 16:17:17 2013 +0200
@@ -217,8 +217,7 @@
         finally:
             shutil.rmtree(tmpdir)
 
-    def restore_database(self, backupfile, drop=True, systemonly=True,
-                         askconfirm=True, format='native'):
+    def restore_database(self, backupfile, drop=True, askconfirm=True, format='native'):
         # check
         if not osp.exists(backupfile):
             raise ExecutionError("Backup file %s doesn't exist" % backupfile)
--- a/server/serverctl.py	Fri Jun 21 16:01:59 2013 +0200
+++ b/server/serverctl.py	Fri Jun 21 16:17:17 2013 +0200
@@ -734,12 +734,12 @@
     mih.backup_database(output, askconfirm=False, format=format)
     mih.shutdown()
 
-def _local_restore(appid, backupfile, drop, systemonly=True, format='native'):
+def _local_restore(appid, backupfile, drop, format='native'):
     config = ServerConfiguration.config_for(appid)
     config.verbosity = 1 # else we won't be asked for confirmation on problems
     config.quick_start = True
     mih = config.migration_handler(connect=False, verbosity=1)
-    mih.restore_database(backupfile, drop, systemonly, askconfirm=False, format=format)
+    mih.restore_database(backupfile, drop, askconfirm=False, format=format)
     repo = mih.repo_connect()
     # version of the database
     dbversions = repo.get_versions()
@@ -848,13 +848,6 @@
           'help': 'for some reason the database doesn\'t exist and so '
           'should not be dropped.'}
          ),
-        ('restore-all',
-         {'short': 'r', 'action' : 'store_true', 'default' : False,
-          'help': 'restore everything, eg not only the system source database '
-          'but also data for all sources supporting backup/restore and custom '
-          'instance data. In that case, <backupfile> is expected to be the '
-          'timestamp of the backup to restore, not a file'}
-         ),
         ('format',
          {'short': 'f', 'default': 'native', 'type': 'choice',
           'choices': ('native', 'portable'),
@@ -874,7 +867,6 @@
                         raise
         _local_restore(appid, backupfile,
                        drop=not self.config.no_drop,
-                       systemonly=not self.config.restore_all,
                        format=self.config.format)
         if self.config.format == 'portable':
             try: