How many people have automated backups taken of their sites? If your some of the few that don't and use cPanel then your in luck.
There are two options you can go. One is to have a set of scripts run by cron on your server and peform the necessary backups, or a bash script run by cron on a *nix box with wget. Of course there is a paid option from cpanelbackup.com, I have never used them or even considered them because I'm a cheap ass.
Now for the scripts stored locally on the host you'll need a ftp server to send all the information to. Keep them outside of the public_html and www dir the last thing you want is some one to be able to get access to these scripts. This isn't a totally set and forget solution. You will have to check your backed up accounts and remove the old backup files from the main directory for the full backups and the database backups from where the script is ran. I didn't write these scripts, but they work and it's a smaller amount of hassle than manually logging into each account and entering in all the information.
I don't have a *nix box aviable to test the bash script. I will assume you will still have to clean up after it.
Strong points of the locally hosted scripts.
minute hour day-of-the-month month day-of-the-week command
a * is a wild card matches any thing and it uses military time for the time format. If you need more indepth then try to follow this it's old but has good info.
Running the scripts from cron is simple. Just enter php /home/<user>/<directory scripts are in>/<scriptname>.php as the command and the time you want.
Example of a script running every day at midnight
0 0 * * * php /home/noob/wicked/fire.php
Only on weekdays at midnight
0 0 * * 1-5 php /home/noob/wicked/fire.php
One thing to consider when choosing a time is that many people choose midnight to run their scripts. So try to choose an oddball time when there will be less server load.
Make it a habit when you either clean up or archive your backups on your backup box to check to make sure all the backups are valid and contain good information. Simply randomly extract one and check a few key files. If there is a problem contact your host, then manually peform a backup and check it.
How often you should backup is dependant on a few things. The site activity, how often you update it, and how valuable it is to you.
If you trust your host to peform backups, PM me for my paypal address so you can send me some money.
There are two options you can go. One is to have a set of scripts run by cron on your server and peform the necessary backups, or a bash script run by cron on a *nix box with wget. Of course there is a paid option from cpanelbackup.com, I have never used them or even considered them because I'm a cheap ass.
Now for the scripts stored locally on the host you'll need a ftp server to send all the information to. Keep them outside of the public_html and www dir the last thing you want is some one to be able to get access to these scripts. This isn't a totally set and forget solution. You will have to check your backed up accounts and remove the old backup files from the main directory for the full backups and the database backups from where the script is ran. I didn't write these scripts, but they work and it's a smaller amount of hassle than manually logging into each account and entering in all the information.
I don't have a *nix box aviable to test the bash script. I will assume you will still have to clean up after it.
Strong points of the locally hosted scripts.
- backups happen when you tell them to even if you loose power.
- the backups are stored locally on the host
- if some one else reads the script odds will be good they already have your account information
- it's not operating system dependant
- your account information is stored in plain text
- if cron isn't set right you don't get a backup
- if the server information isn't set right or is down you don't get a remote backup
- account information isn't stored locally on the host
- one file to edit easier to maintain and setup
- automatically sorts the backups in dated directories
- no need for a ftp server
- the box that's running the script goes down there will be no backup peformed
- all the account information is stored in one file plain text
- again relies on cron to run
- you need a bash shell and wget or be running cygwin
minute hour day-of-the-month month day-of-the-week command
a * is a wild card matches any thing and it uses military time for the time format. If you need more indepth then try to follow this it's old but has good info.
Running the scripts from cron is simple. Just enter php /home/<user>/<directory scripts are in>/<scriptname>.php as the command and the time you want.
Example of a script running every day at midnight
0 0 * * * php /home/noob/wicked/fire.php
Only on weekdays at midnight
0 0 * * 1-5 php /home/noob/wicked/fire.php
One thing to consider when choosing a time is that many people choose midnight to run their scripts. So try to choose an oddball time when there will be less server load.
Make it a habit when you either clean up or archive your backups on your backup box to check to make sure all the backups are valid and contain good information. Simply randomly extract one and check a few key files. If there is a problem contact your host, then manually peform a backup and check it.
How often you should backup is dependant on a few things. The site activity, how often you update it, and how valuable it is to you.
If you trust your host to peform backups, PM me for my paypal address so you can send me some money.