View Single Post
Old 01-18-2011, 13:40   #53
gemeinschaft
AKA Fluffy316
 
gemeinschaft's Avatar
 
Join Date: Feb 2004
Location: Houston, TX
Posts: 4,614
Send a message via AIM to gemeinschaft Send a message via Yahoo to gemeinschaft Send a message via Skype™ to gemeinschaft
I wrote a Batch File that I scheduled to run every night on my PC using the XCOPY command.

Here is a sample that you can change to your liking
REM Copies files from Laptop to Backup drive


xcopy "C:\users\david\documents\work\*.*" "G:\Backup\work" /D/S/V/I/R/Y/J
xcopy "C:\users\david\documents\personal\*.*" "G:\Backup\personal" /D/S/V/I/R/Y/J


Simply write in the location of the data that you want to backup, in this case "C:\users\david\documents\work\*.*" and then edit the destination for the data, in this case "G:\Backup\work" with the command switches /D/S/V/I/R/Y/J

For an explanation of what the command switches are, refer to http://support.microsoft.com/kb/289483

It is important to make sure that your filepath to your backup never changes, otherwise your backup will fail.

I have a shared storage device on my local network, so my destination looks more like "\\10.0.0.8\c$\Backup\work"

My backup server at home has a static IP address assigned from the router, to eliminate issues with duplicate IPs being handed out.

Once you have edited your file to include the proper filepaths using Notepad, save the file as a .BAT and run it manually from the CMD prompt. This way, you can watch to see if there are any errors when you run it. Once you tweak your Bat file to run correctly, you should see the files being copied one by one. Run it again to make sure that the Bat file is skipping those files that already exist without changes since the last backup.

After verifying that the Bat file is good to go, go to your task Scheduler and set a time when you want this bat file to run. This will allow you have your backups automatically.

I hope this helps some of you. If you are like me, your data is very important to you.
__________________
Check my Photography Site at:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 signatures.

Last edited by gemeinschaft; 01-18-2011 at 13:42.. Reason: added color to batch file layout
gemeinschaft is offline   Reply With Quote