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 to create a temporary 302 redirect via htaccess

An easy way to create a temporary redirect from one page to another web page is to use the 302...

When I upload an htaccess file it disappears

On unix/linux systems, files that start with a . are considered hidden so many ftp programs do...

Why can users behind proxies not see my site?

If you have enabled hot link protection users behind proxies may not be able to see your site...

Show longer file names in directory/folder index

If you've ever wanted to show longer file names in your directory listing just create or edit an...

Disable error_log via htaccess

Prevent public display of PHP errors via htaccess# supress php errorsphp_flag...