fabliip.database package

Submodules

fabliip.database.mysql module

fabliip.database.mysql.dump(backup_path, database_name, user='root', host=None, password=None)[source]

Backup MySQL database as a MySQL archive. If host is set to None, 127.0.0.1 will be used. If password is set to None, a prompt will ask a password.

fabliip.database.mysql.get_password_param(user, password)[source]

Ask a password in the prompt

fabliip.database.mysql.restore(backup_path, database_name, user='root', host=None, password=None)[source]

Restore MySQL database. If host is set to None, 127.0.0.1 will be used. If password is set to None, a prompt will ask a password.

fabliip.database.pgsql module

fabliip.database.pgsql.dump(backup_path, database_name, user='postgres', host=None, password=None)[source]

Backs up the given database to the given file as a PostgreSQL archive. If host is set to None, a local connection will be used, so you’ll need to be able to sudo to the given user. Otherwise, a standard password connection will be used and the user will be asked for a password.

Module contents