PostgreSQL备份的后台插件。
backwork-backup-postgresql的Python项目详细描述
后台备份postgresql
在^{
要求
这个插件是在^{
pg_dump
是postgresql
客户端的一部分。
安装
您可以使用pip
安装此插件:
$ pip install backwork-backup-postgresql
使用
安装插件后,您将能够使用backup mysql
命令
在backwork
上。
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 itinstalled 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
您可以传递通常在mysqldump
:
$ backwork backup postgresql -P password --host=192.168.99.1 --username=root --port=32769 --dbname=MY_DATABASE
如--help
消息所示,您可以在中使用两个额外的参数
备份进程--gzip
和-o
。
--gzip
将压缩输出并要求gzip
命令
在您的系统中可用。
-o OUTPUT
或--output OUTPUT
将把pg_dump
的输出保存到
文件。
重要信息:与-h
参数冲突,因为它是保留的
以获取帮助/用法消息。用户--host
传递主机名。