automysqlbackup(8) Automatically backup MySQL automysqlbackup(8)NAME
automysqlbackup - backup all of your database daily, weekly, and monthly
SYNOPSIS
automysqlbackup
DESCRIPTION
This manual page documents briefly the automysqlbackup command.
configuration is stored within the /etc/default/automysqlbackup file
PARAMETERS
USERNAME=dbuser
Username to access the MySQL server e.g. dbuser
PASSWORD="password"
Username to access the MySQL server e.g. password
DBHOST=localhost
Host name (or IP address) of MySQL server e.g localhost
DBNAMES="DB1 DB2 DB3"
List of DBNAMES for Daily/Weekly Backup e.g. "DB1 DB2 DB3"
BACKUPDIR="/backups"
Backup directory location e.g /backups
MAILCONTENT="stdout"
Mail setup What would you like to be mailed to you?
- log : send only log file
- files : send log file and sql files as attachments (see docs)
- stdout : will simply output the log to the screen if run manually.
- quiet : Only send logs if an error occurs to the MAILADDR.
MAXATTSIZE="4000"
Set the maximum allowed email size in k. (4000 = approx 5MB email [see docs])
MAILADDR="user@domain.com"
Email Address to send mail to? (user@domain.com)
ADVANCED OPTIONS
MDBNAMES="mysql $DBNAMES"
List of DBBNAMES for Monthly Backups.
DBEXCLUDE=""
List of DBNAMES to EXCLUDE if DBNAMES are set to all (must be in " quotes)
CREATE_DATABASE=yes
Include CREATE DATABASE in backup?
SEPDIR=yes
Separate backup directory and file for each DB? (yes or no)
DOWEEKLY=6
Which day do you want weekly backups at? (1 to 7 where 1 is Monday)
COMP=gzip
Choose Compression type. (gzip or bzip2)
COMMCOMP=no
Compress communications between backup server and MySQL server?
LATEST=no
Additionally keep a copy of the most recent backup in a separate directory.
MAX_ALLOWED_PACKET=
The maximum size of the buffer for client/server communication. e.g. 16MB (maximum i
SOCKET=
For connections to localhost. Sometimes the Unix socket file must be specified.
#PREBACKUP="/etc/automysqlbackup/mysql-backup-pre"
Command to run before backups (uncomment to use)
#POSTBACKUP="/etc/automysqlbackup/mysql-backup-post"
Command run after backups (uncomment to use)
AUTHOR
This manual page was written by Jose Luis Tallon <jltallon@adv-solutions.net>. for the Debian GNU/Linux system, but can be used by others.
wipe_out 6 Sep 2008 automysqlbackup(8)
Check Out this Related Man Page
BACKUPNINJA(1) backupninja package BACKUPNINJA(1)NAME
BACKUPNINJA - A lightweight, extensible meta-backup system
"a silent flower blossom death strike to lost data."
SYNOPSIS
backupninja [ -h ] [ -d ] [ -n ] [ -t ] [ -f filename ] [ --run filename ]
DESCRIPTION
Backupninja allows you to coordinate system backups by dropping a few simple configuration files into /etc/backup.d/. Most programs you
might use for making backups don't have their own configuration file format. Backupninja provides a centralized way to configure and coor-
dinate many different backup utilities.
FEATURES
- easy to read ini style configuration files.
- you can drop in scripts to handle new types of backups.
- backup actions can be scheduled.
- you can choose when status report emails are mailed to you (always, on warning, on error, never).
- console-based wizard (ninjahelper) makes it easy to create backup action configuration files.
- passwords are never sent via the command line to helper programs.
- in order to backup a db or sql database, you cannot simply copy database files. backupninja helps you safely export the data to a format
which you can backup.
- works with Linux-Vservers.
Backup types include:
- secure, remote, incremental filesytem backup (via rdiff-backup). incremental data is compressed. permissions are retained even with an
unpriviledged backup user.
- basic system and hardware information.
- encrypted remote backups (via duplicity).
- safe backup of MySQL, PostgreSQL, OpenLDAP, and subversion databases.
- burn CD/DVDs or create ISOs.
OPTIONS -h, --help
Show summary of options
-d, --debug
Run in debug mode, where all log messages are output to the current shell.
-f, --conffile CONF_FILE
Use CONF_FILE for the main configuration instead of /etc/backupninja.conf
-t, --test
Run in test mode, no actions are actually taken.
-n, --now
Perform actions now, instead of when they might be scheduled.
--run ACTION_FILE
Runs the action configuration ACTION_FILE and exits.
CONFIGURATION
General settings are configured in /etc/backupninja.conf. In this file you can set the log level and change the default directory loca-
tions. See backupninja.conf(5).
To preform the actual backup actions, backupninja processes each action configuration file in /etc/backup.d according to the file's suffix.
See backup.d(5).
EXAMPLE USAGE
Backupninja can be used to implement whatever backup strategy you choose. It is intended, however, to be used like so:
First, databases are safely copied or exported to /var/backups. Often, you cannot make a file backup of a database while it is in use,
hence the need to use special tools to make a safe copy or export into /var/backups.
Then, vital parts of the file system, including /var/backups, are nightly pushed to a remote, off-site, hard disk (using rdiff-backup). The
local user is root, but the remote user is not privileged. Hopefully, the remote filesystem is encrypted.
In order for this to work (ie for diff-backup to run unattended), you must create ssh keys on the source server and copy the public key to
the remote user's authorized keys file. For example:
root@srchost# ssh-keygen -t rsa -b 4096
root@srchost# ssh-copy-id -i /root/.ssh/id_dsa.pub backup@desthost
Now, you should be able to ssh from user 'root' on srchost to user 'backup' on desthost without specifying a password. When prompted for a
password by ssh-keygen, just leave it blank by hitting return. The "wizard" ninjahelper(1) will walk you through these steps.
FILES
/usr/sbin/backupninja main script
/etc/backupninja.conf main configuration file; general options
/etc/cron.d/backupninja runs main script hourly
/etc/logrotate.d/backupninja rotates backupninja.log
/etc/backup.d directory for configuration files
/usr/share/backupninja directory for handler scripts
/usr/share/doc/backupninja/examples example action configuration files.
SEE ALSO ninjahelper(1), backupninja.conf(5), backup.d(5),
AUTHOR
BACKUPNINJA was written by the riseup.net collective.
riseup October 10, 2005 BACKUPNINJA(1)