I know people who are fanatical about backups. I am not one, probably because nothing bad has ever happened to me. Thinking I would like this to stay that way, I decided to revamp my backup policy.
This is what I used to do: Backup everything important to an external hard disk about once a week. This includes my projects (current and past), Subversion repositories, MySQL databases, mail archives etc. Once or twice a month I would create DVDs containing the latest backup. Occasionally I would move one such DVD to an offsite location (relative’s house).
Obviously this wasn’t a very good strategy, so I made some changes today:
- I created a script to completely automate the backup process (before it was a half done script and manual copying!).
- I assigned myself a recurrent task to run this script every two days.
- I assigned myself a recurrent task to create DVDs every week. I intend to move them offsite at once. No point having them sit next to the external hard disk.
- More importantly I created a script to upload all important files (code, databases, documents) to my host. I will run this every day.
I used simple bat files to create the scripts. For uploading I used the Windows FTP program, and plink for SSHing to my host and executing commands. I wonder how much easier it would be to do it using FinalBuilder. Maybe I’ll give it a try when I next have some time, although it’s a bit expensive ($500).
As a side project I also created a script to deploy the latest MagnaCRM snapshot to my host. That meant some extra work with MySQL and different configuration files but it’s all done now. I can now access it from anywhere, not that it has any significance at this point :)








You can also set up some sort of a automated recurring job, such as a cron entry, to take care of running the scripts and copying the data to the remote location automatically.
I don’t know of any Windows equivalents to cron, but you can always use Cygwin’s cron.
If you have to do it manually, it becomes a chore, and you’ll tend to skip the task.
Comment by Andrey Butov — July 19, 2005 @ 13:43
Windows use the Schedule service, accessible from Scheduled Tasks in the control panel (or by using the AT command in dos prompt).
You are 100% that I’ll probably start skipping the task when it becomes a chore. So I will to try it with a scheduled task. The problem is that my notebook is not always connected to the external disk. I wonder how this will be handled.
Comment by Dimitris Giannitsaros — July 19, 2005 @ 14:02