Backwork plug-in for PostgreSQL backups.
Project description
monsoon-backup-postgresql
Add support for PostgreSQL backups on monsoon
.
Requirements
This plug-in is build on top of pg_dump
,
so you will need to it installed.
pg_dump
is part of the postgresql
client.
Installing
You can use pip
to install this plug-in from Artifactory.
First you will need to configure your pip client by creating or editing the
~/.pip/pip.conf
file to look like this:
[global]
index-url = https://pypi.python.org/simple
extra-index-url = https://<USERNAME>:<API KEY>@na.artifactory.swg-devops.com/artifactory/api/pypi/apset-pypi-local/simple
After that you should be able to run
$ pip install monsoon-backup-postgresql
Alternatively, you can install it directly from GHE:
$ pip install git+ssh://git@github.ibm.com/apset/monsoon-backup-postgresql
Using
After installing the plug-in you will be able to use the backup mysql
command
on monsoon
.
monsoon backup postgresql -h
usage: monsoon backup postgresql [-h] [--gzip] [-o OUTPUT] -P PASSWORD
Backup a PostgreSQL database. It uses `pg_dump` so it's required to have it
installed and added to the system's PATH. You can use any of the arguments
supported by `pg_dump`. Use `pg_dump --help` for more information.
optional arguments:
-h, --help show this help message and exit
--gzip compress output file (requires gzip to be installed)
-o OUTPUT, --output OUTPUT
output file path
-P PASSWORD, --password PASSWORD
PostgreSQL connection password
You can pass any option that you would normally use on mysqldump
:
$ monsoon backup postgresql -P password --host=192.168.99.1 --username=root --port=32769 --dbname=MY_DATABASE
As shown in the --help
message, there are two extra arguments you can use in
your backup process --gzip
and -o
.
--gzip
will compress the output and requires the gzip
command to be
available in your system.
-o OUTPUT
or --output OUTPUT
will save the output of pg_dump
into a
file.
Important: There is a conflict with the -h
argument since it is reserved
for the help/usage message. User --host
to pass the hostname.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for backwork-backup-postgresql-0.1.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 419151336c225cbbcb54496215e6b5ba046958522b5165492e9e33299156dd57 |
|
MD5 | 2256c85f3618f2e3324ba1ed769357ac |
|
BLAKE2b-256 | a63aa4c385289647615dc9abc8d6fc2222c61bef539bdf89dfa5d5b7bb7aa03e |
Hashes for backwork_backup_postgresql-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 285b2a99e186aa5c5fd8ba17aa63c6aaa423e3e7211e183fc1a1c1d3d3f9f5f6 |
|
MD5 | b501ce74112846ca6c9e57fb2b57efac |
|
BLAKE2b-256 | ef7d9f2b8694b4a1f9f2438451b37d3cb85cab0d77ad720cd6d74825c3547d50 |