示例#1
0
def restore_database(virtualenv_path, scripts_path, file_path):
    """ Drop, create, restore """

    commands.python_run(env.virtualenv_path, '%s/db_drop.py' % env.scripts_path)
    commands.python_run(env.virtualenv_path, '%s/db_create.py' % env.scripts_path)
    commands.sql_execute_file(env.virtualenv_path, env.scripts_path, file_path)
示例#2
0
def backup_database(virtualenv_path, scripts_path, file_path):

    commands.python_run(
        virtualenv_path,
        '%s/db_backup.py "%s"' % (scripts_path, file_path)
    )