Your server's hard drive crashed. Your site is hacked and the hacker deleted all your files. Your web host disappeared with your money and your data. Even worse, there was and earth quack and your ISP building is gone down and everything is lost.
Touch Wood!!! Nobody should face such a situation. But if you are not prepared for these situations, your hard work might be lost forever. That is why it is of the utmost importance that you keep regular backups of your data.
Now there are many questions −
If your site is not changing over a period of time, then it is advisable to take backups only once and keep it on your hard disc or data disc or DVD wherever you like. In case you need to restore it, just do it and see if your website is up and running.
But if you are in the habit of making frequent modifications on your site, then it is necessary that you take regular backup. Websites like amazon.com have very tight backup schedules and very expensive backup infrastructure.
It depends on your business and you have to see how much data loss you can bear. If you think it is not affordable to lose even a single day’s data, then I would recommend to schedule daily backup and similarly, you can decide if weekly or monthly backup are OK for you or not.
Most of the times, backups are taken from one machine and saved on another machine or media. If possible, you should arrange a different backup server where you can FTP your complete data to be backup up. If this is not too much then you can keep it in data CD or DVD etc.
If possible, keep multiple copies of backup but with a managed way to avoid any confusion. You should have a proper version control over different backups. There are many service providers who provide you different backup servers with a very nominal cost and it is recommended that you spend that amount on backup services.
There are two types of backup − incremental and full. It depends on what type of backup tools you are using. There are many backup tools − for example, Oracle provides its own utilities to take different types of backup.
Incremental Backup − The backup’s controller compares the existing backup with the data that you wish to backup. If there is an exact match between the two, then no additional files will be backed up. However, if you have added or edited any file, these files will be updated in the backup, thus the name incremental.
Full Backup − Here all files are written to the backup, even if they already exist in the most current backup.
The simplest case is that you can login to your web server on a monthly or weekly basis and copy all the website related files on different computer or media. It works only in case you have limited amount of data on your site.
If you have a huge database and numerous files, then it is difficult to manage such backups on an everyday and weekly basis. In such cases, you may need to have automated scripts to take backup and keep them at another machine or media.
You can write your shell script or perl script and browse through different directories and collect all the files and zip them automatically, assign them a unique backup number and then ftp those files on a designated backup server or media like tap drive.
It is up to you to decide how you want to take your backup. If you are a website owner, then you must take regular backup without failure. Else, it might lead to serious consequences.