Back up Batch file

2011-08-24

I thought I'd share my method for file back up. Instead of messing with hooking up external hard drives or tape back up, I just have two physical hard drives in my computer. One of them is 1TB and the other is 250GB. With Windows Task Scheduler I run a batch file every week.

backup.bat:

xcopy /E /D /S /H /R /Y "c:\Documents and Settings\Your Name\Desktop\Documents" E:\Documents
xcopy /E /D /S /H /R /Y "c:\Documents and Settings\Your Name\Desktop\mp3" E:\mp3
xcopy /E /D /S /H /R /Y "c:\Documents and Settings\Your Name\Desktop\Pictures" E:\Pictures
xcopy /E /D /S /H /R /Y "c:\Documents and Settings\Your Name\Desktop\Videos" E:\Videos

This is how I have been organizing my file system recently, obviously you will need to change the directories to reflect your situation. If you have several people in your house you may want to share a folder on the network that anyone can copy files they need backed up as well.

One thing to note is deleting files on your hard drive wont be reflected on the back up drive. If I make a whole bunch of changes to a directory tree, I usually just delete the backup version and run the file again to refresh it.

If anyone has a good method for removing files that don't exist on the main drive from the back up drive, please let me know at blog@cygnusx.com.