Divi WordPress Theme

Topic: Backup MySQL database via cron on Linux  (Read 3996 times)

Offline HRamesh

  • New Member
  • *
  • Posts: 34
  • iTrader: +0/-0
    • View Profile
Backup MySQL database via cron on Linux
« on: November 09, 2008, 10:35:52 AM »
Hi,

One of the most important things for your web site is the Database. It is necessary to take the backup of your web site as well as Databases on regular basis. One of the easy sway to take backup of your MySQL database is via cron. And then you can download the backup via FTP. you can set the below cron to take MySQL backup on daily basis:

0 * * * * /usr/bin/mysqldump -u databaseusername databasename -ppassword > /path/to/take/backup.sql

The above cron will dump your MySQL database at 12 (Mid night) each day. You can set the cron time based on your convenient time.

Regards,

Ramesh
VPS Hosting - AccuWebHosting

Offline Kevin

  • Junior Guru
  • **
  • Posts: 72
  • iTrader: +4/-0
    • View Profile
Re: Backup MySQL database via cron on Linux
« Reply #1 on: November 25, 2008, 10:04:22 AM »
Hi Ramesh,

Thanks for sharing it.

Kevin
Divi WordPress Theme
Tags: