dbbu is a simple Python module to assist with remote database backups. It's designed to be used in conjunction with [[http://rsnapshot.org/|rsnapshot]] as a backup_script parameter, but can run standalone as well.
This has pretty limited use and is still a work in progress!
=== Installation and Basic Use == =
+== Installation and Basic Use ==
$ hg clone http://bitbucket.org/copelco/dbbu/
=== rsnapshot Configuration == =
+== rsnapshot Configuration ==
To use dbbu with rsnapshot, add a backup_script parameter like so:
Then setup /etc/dbbu.cfg with each host as described in "dbbu's Configuration File" below.
=== How Does It Work? == =
dbbu uses the [[http://docs.python.org/library/subprocess.html|subprocess module]] to ssh and execute commands on remote hosts (using Popen). It then pipes database dumps into files on the local filesystem.
=== Host Configuration == =
+== Host Configuration ==
Create a user for backup purposes only:
bak ALL = (postgres) NOPASSWD: POSTGRES_CMDS
== dbbu's Configuration File = =
+= dbbu's Configuration File =