server/migractions.py
changeset 2489 37a747ad6fd4
parent 2476 1294a6bdf3bf
child 2493 9806571ea790
equal deleted inserted replaced
2488:cd007fc4f2ea 2489:37a747ad6fd4
   111         config = self.config
   111         config = self.config
   112         source = config.sources()['system']
   112         source = config.sources()['system']
   113         helper = get_adv_func_helper(source['db-driver'])
   113         helper = get_adv_func_helper(source['db-driver'])
   114         date = datetime.now().strftime('%Y-%m-%d_%H:%M:%S')
   114         date = datetime.now().strftime('%Y-%m-%d_%H:%M:%S')
   115         app = config.appid
   115         app = config.appid
   116         backupfile = backupfile or join(config.backup_dir(),
   116         backupfile = backupfile or join(config.appdatahome, 'backup',
   117                                         '%s-%s.dump' % (app, date))
   117                                         '%s-%s.dump' % (app, date))
   118         if exists(backupfile):
   118         if exists(backupfile):
   119             if not self.confirm('a backup already exists for %s, overwrite it?' % app):
   119             if not self.confirm('a backup already exists for %s, overwrite it?' % app):
   120                 return
   120                 return
   121         elif askconfirm and not self.confirm('backup %s database?' % app):
   121         elif askconfirm and not self.confirm('backup %s database?' % app):