backup-manager is a versatile and easy to use command line backup tool (a set of scripts) for Linux. It is suitable for desktop and servers.
* supports MySQL and PostgreSQL
* compress with Gzip
* dead simple configuration
1 |
apt-get install backup-manager |
Some parameters of /etc/backup-manager.conf are below:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
# Where to store the archives export BM_REPOSITORY_ROOT="/var/backups" export BM_ARCHIVE_METHOD="tarball mysql" export BM_TARBALL_FILETYPE="tar.gz" export BM_TARBALL_DIRECTORIES="/etc/mysql /etc/apache2 /var/www /var/lib/mysql" export BM_TARBALL_BLACKLIST="/var/backups" export BM_TARBALLINC_MASTERDATETYPE="weekly" export BM_TARBALLINC_MASTERDATEVALUE="1" export BM_MYSQL_DATABASES="forum_s jiga_jig" export BM_MYSQL_ADMINLOGIN="odmin" export BM_MYSQL_ADMINPASS="myPa$$w0rd" export BM_MYSQL_HOST="localhost" export BM_MYSQL_FILETYPE="gzip" |
And add to the cron file /etc/crontab:
1 |
59 23 * * Sat root backup-manager |
backup-manager does not allow you to backup from one database type and restore to another. A MySQL dump is not compatible with PostgreSQL.