server/serverctl.py
changeset 2507 45248d0ad8a0
parent 2493 9806571ea790
child 2615 1ea41b7c0836
equal deleted inserted replaced
2506:965d5e1557ed 2507:45248d0ad8a0
   503     mih.shutdown()
   503     mih.shutdown()
   504 
   504 
   505 def _local_restore(appid, backupfile, drop, systemonly=True):
   505 def _local_restore(appid, backupfile, drop, systemonly=True):
   506     config = ServerConfiguration.config_for(appid)
   506     config = ServerConfiguration.config_for(appid)
   507     config.verbosity = 1 # else we won't be asked for confirmation on problems
   507     config.verbosity = 1 # else we won't be asked for confirmation on problems
       
   508     config.repairing = 1 # don't check versions
   508     # schema=1 to avoid unnecessary schema loading
   509     # schema=1 to avoid unnecessary schema loading
   509     mih = config.migration_handler(connect=False, schema=1, verbosity=1)
   510     mih = config.migration_handler(connect=False, schema=1, verbosity=1)
   510     mih.restore_database(backupfile, drop, systemonly, askconfirm=False)
   511     mih.restore_database(backupfile, drop, systemonly, askconfirm=False)
   511     repo = mih.repo_connect()
   512     repo = mih.repo_connect()
   512     # version of the database
   513     # version of the database