Is it possible to make a cron to backup my database at specific times?

Yes, this can be very useful for forum/message board sites with large databases. In your control panel under cron jobs use the following command:

mysqldump --user=YOURDBUSERNAME --password=YOURDBPASSWORD --quick --add-drop-table --add-locks --extended-insert --lock-tables --all DATABASENAME | gzip > /home/username/path/to/backup/folder/databasename-`date -I`.gz

  • 420 Users Found This Useful

Was this answer helpful?

Related Articles

How can I redirect http to https?

Create an .htaccess file with the following contents and upload it to your public_html directory....

When should I use ascii and when should I use binary?

Many FTP client programs support and auto mode to detect the proper upload type based on file...

Redirect http to https and www

To forward a website to use both www. and https:// use the following in an .htaccess file:...

Your connection to this server has been blocked at the firewall

If you receive the message: "Your connection to this server has been blocked at the firewall. If...

htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

To solve “.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable” follow...