pg_raxarchive it's an utility tool to manage Postgresql's WAL file archiving using
Rackspace cloudfiles.
- Python 2.7
pyraxmodule installed- A rackspace account :-)
Install using pip and git:
pip install git+https://github.com/duilio/pg_raxarchive#egg=pg_raxarchive
(pypi package in progress)
By default, pg_raxarchive reads Rackspace credentials from the /etc/pg_raxarchive.ini
file. The configuration is the same as pyrax ini file:
[rackspace_cloud]
username = YOUR_USERNAME_HERE
api_key = YOUR_API_HERE
On your master postgresql.conf set the archive command to:
archive_mode = on
archive_command = 'pg_raxarchive upload %p %f'
On your slave recovery.conf set the restore command to:
restore_command = 'pg_raxarchive download %f %p'
archive_cleanup_command = 'pg_raxarchive cleanup %r'
And you are done.
--helpshow the help screen--configsets Rackspace credential file, defaults to/etc/pg_raxarchive.ini.--regionsets Rackspace region to use, defaults toDFW.--containersets the container name, defaults topg_archives.--use-publicuse non internal connection for cloudfiles (i.e. when running from a non-Rackspace host).--debugenable some debugging info.
Currently only upload subcommand has an option.
--disable-compressiondo not use gzip to compress the WAL
This software is distributed with a BSD license. If you want to contribute to it, please feel free to submit a pull request. The official git repository is on github:
https://github.com/duilio/pg_raxarchive
Some future development might be:
- Usage of environment variables for Rackspace authentication.
- Usage of command line options for Rackspace authentication.
- Better handling of large files during download.