
The account already has a daily copy made by us, before dawn. A copy of your application, made by you, serves two cases: having the database and the files to hand without waiting for a restore, and having a copy outside the account. The trick is a small script that does the mysqldump and archives the files, and a scheduled task that calls it.
Putting it together
|
|
|
|
|
|
| Watch out for | Why |
| Outside public_html | A copy in there can be downloaded by anyone who guesses the name. |
| Password in the .cnf file | It stays out of the command history and the script, and with permission 600 only your account reads it. |
| Few local copies | They count against the account’s space and its number of files. See the limits. |
| A quiet hour | A large backup uses the account’s processor and disk while it runs. |
| A copy that sits in the same account does not protect you from losing the account. It is for speed; to be safe, there has to be a copy somewhere else. And a copy that was never restored can be empty without anyone noticing. |
| Mind the % in cron. In a cron command, the % character must be written \%. That is why the date stays inside the script, not on the cron line. |
| Using PostgreSQL? pg_dump plays mysqldump’s part. It is explained in backing up with mysqldump and pg_dump. And what JetBackup keeps, and for how long, is in how long we keep backups. |
|
The job runs, but the log shows an error you cannot make sense of? Send us the cron line and the text of the log. Open a support ticket |
|
SEE ALSO Backing up with mysqldump and pg_dump, and restoring the copy Cron jobs: what they are for and how to create one Making and keeping your own backup, and testing that it works |
RECOMMENDED PRODUCT Web hosting with cPanel Domain and SSL included, daily backups and the panel you already know. from $6.60/mo (3-year plan, with coupon) See plans |
- 0 Users Found This Useful











