Often we need to backup some files on the servers on regular basis. There are 2 important things about backups which you should keep in mind and use:
- store backups on another server (not on the same where files are located);
- test restore scenario.
In order to store backups on another servers you may use online storages, like box.com, dropbox, Google drive, MS SkyDrive and others. Also many cloud hosting providers have own backup solutions, for example Rackspace Cloud Backup, which requires installation of additional backup agent on the server (it is free). It is really convenient solution, because you don’t need to have separate server image which is not cheap. However cloud storages are also not free and in most cases you have to pay as much as many megabytes you use. So in order to reduce costs at first you need to take care about deleting old backups from the cloud. Some cloud providers have own solutions for it. E.g. currently Rackspace Cloud Storage contains 3 options to delete old backups:
- store backups 30 days;
- store backups 60 days;
- store backups infinitely.
Also some backups software have option to delete files from backups using configurable rules. At second you need to decrease file size which is stored in the cloud storage. Many backup programs also can do that, but it can be done only by using Windows built-in features. In order to do it you may use simple cmd script which copies original file from its folder to folder for backup (in order to not affect work of the programs which use this file) and archives it to zip:
As you can see it copies file using xcopy command (line 1) and then packages it to zip archive (line 2) using second script zip.vbs. If you will google for this script you will find many references, however not all of them work. Here is the script which works for me:
It has 2 parameters: first is folder which has to be archived and second is path to output zip file. Unfortunately I found it quite long time ago and can’t provide the link to the original site, where I found it. But all credits goes to its author.
After that you need to setup scheduler task which will run this cmd script by schedule, e.g. daily. And the remaining thing is to setup copy of zip archive to your cloud storage. Using this technique you will be able to reduce the costs which you have to pay for storing backups in the cloud.