Example #1
0
def restore_dump(file_name=None, migrations=False):
    """Upload dump to host, remove existing db, recreate then restore dump."""
    _all()
    postgres.restore_postgres_dump(
        env.repo_alias,
        ignore_permissions=True,
        file_name=file_name,
        user=env.wsgi_user,
        password=env.wsgi_user)
Example #2
0
def upload_postgres_dump(dump_path):
    """Upload the dump found in dump_path and restore it to the server.

    .. note existing data on the server will be destroyed.

    :param dump_path: Local file containing dump to be restored.
    :type dump_path; str
    """
    restore_postgres_dump("changelog", user="******", ignore_permissions=True, file_name=dump_path)
Example #3
0
def upload_postgres_dump(dump_path):
    """Upload the dump found in dump_path and restore it to the server.

    .. note existing data on the server will be destroyed.

    :param dump_path: Local file containing dump to be restored.
    :type dump_path; str
    """
    restore_postgres_dump(
        'changelog',
        user='******',
        ignore_permissions=True,
        file_name=dump_path)
Example #4
0
def restore_postgres_dump_locally():
    """Restore postgresql dump to local host db: changelog."""
    restore_postgres_dump(
        dbname='changelog',
        user='******',
        password='******')
Example #5
0
def restore_postgres_dump_locally():
    """Restore postgresql dump to local host db: changelog."""
    restore_postgres_dump(dbname="changelog", user="******", password="******")
Example #6
0
def restore_postgres_dump_locally():
    """Restore postgresql dump to local host db: changelog."""
    restore_postgres_dump(
        dbname='changelog',
        user='******',
        password='******')