Steven's Notebook

Look Ma - No Hands!

Cheap Backup

I do fairly regular backups from my server to tape, but I normally carry around most of my documents on my laptop as well. Copying them to the server is a pain, since many of them havn’t changed and the Windows GUI doesn’t have an easy way to copy just the updated ones (and please don’t suggest the briefcase, I never have been happy with that). So here’s what I do use, that old favorite – XCOPY

myBackup.bat

c:
cd "\documents and settings"\\vore\\"My Documents"
net use y: \\\myserver.at.the.office\\myShare
c:
xcopy .\\*.* Y:\\docs\\ /exclude:exclude.txt /y /d /s
pause

/y keeps me from being bothered with any prompts
/d means ‘newer files only’
/s has it traverse subdirectories
/exclude has xcopy read a file, in my case called exclude.txt. That file has lines that keep this job from copying any music (why oh why is “My Music” inside the “My Documents” folder?) or pictures.

exclude.txt


.mp3
.wav
.wma

Open a command prompt (Start->Run->CMD) and type XCOPY /? to see all the options.

Steven's Notebook © 2000-2014 Frontier Theme