• Increase font size
  • Default font size
  • Decrease font size
automysqlbackup

 Schedule a task that runs the following command: 

mysqldump -u root -p xxx cacti > whatislinux.dump 

That's a full database backup. Then you should backup you system. 

AutoMySQLBackup:A script to take daily, weekly and monthly backups of your MySQL databases using mysqldump. Features - Backup mutiple databases - Single backup file or to a seperate file for each DB - Compress backup files - Backup remote servers - E-mail logs

Download: 

AutoMySQLBackup

More:

How to automatic Backup cacti on linux

 

 

 

 

AutoMySQLBackup Installation..

The install is as simple as editing a few variables in the AutoMySQLBackup file. The full setup is documented in the AutoMySQLBackup script file below the variables section..

Here is a quick minimum setup step by step..

1. Download automysqlbackup.sh and place it into your /etc/cron.daily directory or your home directory.
2. Edit (at least) the following lines :-


# Username to access the MySQL server e.g. dbuser

 

USERNAME=dbuser
# Username to access the MySQL server e.g. password
PASSWORD=password
# Host name (or IP address) of MySQL server e.g localhost
DBHOST=localhost
# List of DBNAMES for Daily/Weekly Backup e.g. "DB1 DB2 DB3"
DBNAMES="all"
# Backup directory location e.g /backups
BACKUPDIR="/var/backup/mysql"
# Mail setup
MAILCONTENT="quiet"
You can also run the script manually:
./automysqlbackup.sh.2.5


3. Make the file executable :- chmod u+rwx
4. Create the following directory.

/backups

5. That's it.. Now you can run it using the command line "./automysqlbackup.sh" or if it is in /etc/cron.daily it will run each day when cron runs. 

but probably you will want to enable it in cron and run daily. You can just dump it in the /etc/cron.daily/ folder and you should be done.  .
 
Myself I like to place it in /opt and create a symlink to the file (to help with future updates of the script):
ln -s automysqlbackup.sh.2.5 automysqlbackup.sh
and run it from cron by placing in /etc/crontab something like:
#MySQL Daily backup
45 5   * * *   root    /opt/automysqlbackup.sh >/dev/null 2>&1
 

 A script to take daily, weekly and monthly backups of your MySQL databases using mysqldump. Features - Backup mutiple databases - Single backup file or to a seperate file for each DB - Compress backup files - Backup remote servers - E-mail logs - More.

download:

http://downloads.sourceforge.net/project/automysqlbackup/AutoMySQLBackup/AutoMySQLBackup%20VER%202.5/automysqlbackup.sh.2.5?use_mirror=nchc

All Files:http://sourceforge.net/projects/automysqlbackup/files/

How to backup mysql database using AutoMySQLBackup

 

With mysqldump anyone can write a small shell script and running it from cron, it will achieve an automatic backup solution

AutoMySQLBackup can backup a single database, multiple databases, or all the databases on the server; each database is saved in a separate file that can be compressed (with gzip or bzip2); it will rotate the backups and not keep them filling your hard drive (as normal in the daily backup you will have only the last 7 days of backups, the weekly if enabled will have one for each week, etc.).

# Username to access the MySQL server e.g. dbuser
USERNAME=dbuser

# Username to access the MySQL server e.g. password
PASSWORD=password

# Host name (or IP address) of MySQL server e.g localhost
DBHOST=localhost

# List of DBNAMES for Daily/Weekly Backup e.g. "DB1 DB2 DB3"
DBNAMES="DB1 DB2 DB3"

# Backup directory location e.g /backups
BACKUPDIR="/var/backup/mysql"


You can also run the script manually:

./automysqlbackup.sh.2.5

You can just dump it in the /etc/cron.daily/ folder and you should be done.  .
Myself I like to place it in /opt and create a symlink to the file (to help with future updates of the script):

ln -s automysqlbackup.sh.2.5 automysqlbackup.shand run it from cron by placing in /etc/crontab something like:

#MySQL Daily backup
45 5   * * *   root    /opt/automysqlbackup.sh >/dev/null 2>&1

Download AutoMySQLBackup

 

Login Form