Beranda > System Administrator > Backup MySQL Otomatis

Backup MySQL Otomatis

Sedikit triks untuk backup mysql database yang paling mudah,

1. Download MySQLBackup Installer
$ wget

2. Extract dan Run
$ tar-xzvf automysqlbackup-v3.0_rc6.tar.gz
$ sudo ./

3. Sesuaikan dengan informasi pada server :
### Checking archive files for existence, readability and integrity.
automysqlbackup … exists and is readable … md5sum okay 🙂
automysqlbackup.conf … exists and is readable … md5sum okay 🙂
README … exists and is readable … md5sum okay 🙂
LICENSE … exists and is readable … md5sum okay 🙂
Select the global configuration directory [/etc/automysqlbackup]:
Select directory for the executable [/usr/local/bin]:
### Creating global configuration directory /etc/automysqlbackup: success
### Copying files. if running under the current user,
### you have to use the full path /usr/local/bin/ automysqlbackup
### since /usr/local/bin is not in ‘echo $PATH’ Setup Complete!

4. Edit /etc/mysqlbackup/myserver.conf
# Basic Settings
# Username to access the MySQL server e.g. dbuser
# Password to access the MySQL server e.g. password
# Host name (or IP address) of MySQL server e.g localhost
# “Friendly” host name of MySQL server to be used in email log
# if unset or empty (default) will use CONFIG_mysql_dump_host instead
# Backup directory location e.g /backups
# List of databases for Daily/Weekly Backup e.g. ( ‘DB1’ ‘DB2’ ‘DB3’ … )
# set to (), i.e. empty, if you want to backup all databases

5. Buat script sederhana untuk membuat scheduler (misal nama file : disimpan di /home/verrysoon/)
#~~~~ Copy From Below Here ~~~~
/usr/local/bin/automysqlbackup /etc/automysqlbackup/myserver.conf
chown root.root //home/verrysoon/backup* -R
find /home/verrysoon/backup* -type f -exec chmod 400 {} \;
find /home/verrysoon/backup* -type d -exec chmod 700 {} \;
#~~~~~ Copy To Above Here ~~~~

6. Edit Cron Job
$ crontab -e
5 5 * * 8 /home/verrysoon/

Scheduler tersebut akan dijalankan setiap hari pukul 05.05 setiap hari dan data backup akan disimpan ke folder /home/verrysoon/backup .

Best Regards,

  1. September 22, 2014 pukul 6:00 pm

    Hello there, just became aware of your blog through Google, and found that it’s really informative.
    I am gonna watch out for brussels. I will be grateful if you continue this in future.

    Many people will be benefited from your writing.

  1. No trackbacks yet.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:


You are commenting using your account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )


Connecting to %s