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

“Not Secure” Web Error

In this day and age browsers now default to using https:// instead of http://. We make SSL...

Cross Origin Request Error

When receiving a cross-origin / cross original request, CORS header 'Access-Control-Allow-Origin'...

What is a Top-Level-Domain (TLD)?

TLD stands for Top Level Domain. This includes any domain names which suffix is .com, .net, .org,...

Why do I get emails for cron jobs?

This is the default. If you would like to disable receiving emails when a cron job runs append...

Troubleshooting Cloudflare errors

You may encounter errors using CloudFlare from time to time. This article may help to resolve...