Backup, backup, backup
I recently had a bit of a disaster and corrupted my main disk. I managed to get it back as I detailed in a previous post. Since then I've installed a Slave Drive onto which I copied the my main HD…
Here's what I did;
- Purchase a Slave Drive at least 3 times the size of your main drive. Thus if you have a 40Gb drive, buy a 120Gb slave. Drives are really cheap, so this won;t cost too much.
- Install the Slave Drive. Fairly simple - if I can do it, anyone can.
- Format the new Drive and assign a Drive to it. you do this via Windows. Again, if I can do it, anyone can.
- Next up is to create some batch files which will copy the contents across. Here is what I use (thanks to Rosco in the DDN Forum); nightly.bat
@echo off
xcopy "C:\Documents and Settings\Burt\Desktop\*" "F:\Nightly\Desktop\" /c /f /e /k /y
xcopy "C:\Documents and Settings\Burt\My Documents\*" "F:\Nightly\My Documents\" /c /f /e /k /y
xcopy "C:\phpdev\*" "F:\Nightly\phpdev\" /c /f /e /k /y
pause
exitweekly.bat
@echo off
xcopy C:\* F:\Weekly\ /c /f /e /k /y
exitmonthly.bat
@echo off
xcopy C:\* F:\Monthly\ /s /e /m /c /k /y /d
exit - Next up, is to create a Windows Schedule Task which runs those three batch files. For nightly, I run this nightly (obviously), for weekly I run this every Monday. For monthly I run each 1st of the month.
So, what does this achieve?
The aim is three-fold. To make sure that I save all my "user documents" each night. I only ever save in "my documents" or directly on the desktop. To save everything once a week and once a month. In the case of an accidental delete, I can go back further to retrieve anything…
In the code examples above, you can see that C: is my mian drive, and F: is my slave drive. Should anything happen to my C: drive, I can easily install a new C: (or reformat it or whatever), and then backup from F:
I think it's worth anyone spending some time and money to make sure that adequate backup procedures are in place. Of course, this set-up is not perfect, but allied to a few removable drives which are stored in a fire-safe, I think I have most angles covered.

Comment by Anonymous Coward — November 23, 2006 @ 4:25 pm
I use something similar, though I just back up everything once a night; it's a bash script, so it won't natively port to Windows, but you get the idea;
#!/bin/bash
# Create Backup Directory
DIR=`date +\%Y-\%m-\%d_\%H-\%M-\%S`
mkdir /mnt/net/file/backup/nightly/linux/mysql-${DIR}
# Backup MySQL Database
mysqldump -h HOST -u USERNAME –all-databases > /mnt/net/file/backup/nightly/linux/mysql-${DIR}/full_dump_`date +\%Y-\%m-\%d_\%H-\%M-\%S`.sql
Comment by Dave J — November 23, 2006 @ 10:43 pm
Working docs go to DVD daily. Each week I push a full disk image to a supplementary drive in each PC. Monthly I do the same but to an outboard usb drive. I used to use Norton Ghost but now Acronis True Image 10 which is easier and quicker.
Fresh copies of everything go "off-site" monthly. Bit paranoid about back-ups after a major screw up a few years back
Comment by Terral — November 27, 2006 @ 4:56 pm
I have to agree. I sleep better with a nightly backup running. I have a recent project with 150 individual products many of which are very similar. On more than one occasion I duplicated a file to make brand changes and do a "save as" but hit save and closed it before I realized what I was doing. Thereby obliterating the original file. As long as I had saved it more than a day ago I was able to bring back the original. Sometimes I didn't realize what I had done for several days and was able to go back and find a correct version.
Comment by burt — November 29, 2006 @ 9:59 am
Cheers Guys - guess what I did yesterday…
I accidentally erased a folder full of client work. Erased as in 7-pass, scattered to the winds type of erase…
Managed to get the folder back by going to the weekly backup, then overwriting with the previous nights backup (obviously to add in the few files added since the last weekly). Sweet!