# backwork-backup-postgresql [](https://travis-ci.org/IBM/backwork-backup-postgresql) [](https://badge.fury.io/py/backwork-backup-postgresql)
Add support for PostgreSQL backups on [`backwork`](https://github.ibm.com/apset/backwork).
## Requirements
This plug-in is build on top of [`pg_dump`](https://www.postgresql.org/docs/current/static/app-pgdump.html),
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:
```sh
$ pip install backwork-backup-postgresql
```
## Using
After installing the plug-in you will be able to use the `backup mysql` command
on `backwork`.
```sh
backwork backup postgresql -h
usage: backwork 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`:
```sh
$ backwork 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.
Raw data
{
"_id": null,
"home_page": "https://github.com/ibm/backwork-backup-postgresql",
"name": "backwork-backup-postgresql",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Luiz Aoqui",
"author_email": "laoqui@ca.ibm.com",
"download_url": "https://files.pythonhosted.org/packages/19/b2/9f33fe6972b3efbdec5594c61c4f63dd90545150b603e6b6c26e26f64a8d/backwork-backup-postgresql-0.2.2.tar.gz",
"platform": null,
"description": "# backwork-backup-postgresql [](https://travis-ci.org/IBM/backwork-backup-postgresql) [](https://badge.fury.io/py/backwork-backup-postgresql)\nAdd support for PostgreSQL backups on [`backwork`](https://github.ibm.com/apset/backwork).\n\n## Requirements\nThis plug-in is build on top of [`pg_dump`](https://www.postgresql.org/docs/current/static/app-pgdump.html),\nso you will need to it installed.\n\n`pg_dump` is part of the `postgresql` client.\n\n## Installing\nYou can use `pip` to install this plug-in:\n```sh\n$ pip install backwork-backup-postgresql\n```\n\n## Using\nAfter installing the plug-in you will be able to use the `backup mysql` command\non `backwork`.\n\n```sh\nbackwork backup postgresql -h\nusage: backwork backup postgresql [-h] [--gzip] [-o OUTPUT] -P PASSWORD\n\nBackup a PostgreSQL database. It uses `pg_dump` so it's required to have it\ninstalled and added to the system's PATH. You can use any of the arguments\nsupported by `pg_dump`. Use `pg_dump --help` for more information.\n\noptional arguments:\n -h, --help show this help message and exit\n --gzip compress output file (requires gzip to be installed)\n -o OUTPUT, --output OUTPUT\n output file path\n -P PASSWORD, --password PASSWORD\n PostgreSQL connection password\n```\n\nYou can pass any option that you would normally use on `mysqldump`:\n\n```sh\n$ backwork backup postgresql -P password --host=192.168.99.1 --username=root --port=32769 --dbname=MY_DATABASE\n```\n\nAs shown in the `--help` message, there are two extra arguments you can use in\nyour backup process `--gzip` and `-o`.\n\n`--gzip` will compress the output and requires the `gzip` command to be\navailable in your system.\n\n`-o OUTPUT` or `--output OUTPUT` will save the output of `pg_dump` into a\nfile.\n\n**Important:** There is a conflict with the `-h` argument since it is reserved\nfor the help/usage message. User `--host` to pass the hostname.\n",
"bugtrack_url": null,
"license": "Apache 2",
"summary": "Backwork plug-in for PostgreSQL backups.",
"version": "0.2.2",
"project_urls": {
"Homepage": "https://github.com/ibm/backwork-backup-postgresql"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b1920437889f55fe9caf21f6471661a3cc99ea00f5432b4c8ba14dce268fc71c",
"md5": "b410b068fef1510e42fda8e71f068b01",
"sha256": "694ecdd0516332c5115e429f4008fc86f76b50fd0358fbf3f5af09dd5766b6ba"
},
"downloads": -1,
"filename": "backwork_backup_postgresql-0.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b410b068fef1510e42fda8e71f068b01",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 8134,
"upload_time": "2023-06-29T17:26:19",
"upload_time_iso_8601": "2023-06-29T17:26:19.589373Z",
"url": "https://files.pythonhosted.org/packages/b1/92/0437889f55fe9caf21f6471661a3cc99ea00f5432b4c8ba14dce268fc71c/backwork_backup_postgresql-0.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "19b29f33fe6972b3efbdec5594c61c4f63dd90545150b603e6b6c26e26f64a8d",
"md5": "571d6b679f7f7633e98c2aa25e5c888b",
"sha256": "dd7433e349f09d2e3c1b46b5071de333a7f3f865be2ea93e65991c2f9244c9b2"
},
"downloads": -1,
"filename": "backwork-backup-postgresql-0.2.2.tar.gz",
"has_sig": false,
"md5_digest": "571d6b679f7f7633e98c2aa25e5c888b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8110,
"upload_time": "2023-06-29T17:26:21",
"upload_time_iso_8601": "2023-06-29T17:26:21.047923Z",
"url": "https://files.pythonhosted.org/packages/19/b2/9f33fe6972b3efbdec5594c61c4f63dd90545150b603e6b6c26e26f64a8d/backwork-backup-postgresql-0.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-29 17:26:21",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ibm",
"github_project": "backwork-backup-postgresql",
"github_fetch_exception": true,
"lcname": "backwork-backup-postgresql"
}