Backup help!

Associate
Joined
19 Mar 2009
Posts
1,605
Location
Leicester
Hey guys,

I have just migrated from WHSv1 to 2011. I have 6x2TB drives and was planning on using RAID 1 for redundancy. However, ive been having no end of problems with the array needing rebuilds and stuff, so ive decided to give up with it. Using windows mirroring from computer management seems to be a massive pain in backside as its constantly resynching.

So what im looking for is a simple way of doing an "echo" from one drive to another which can be scheduled as a task on the WHS, back in the day I used to use .bat files for this, but ive lost my templates and cant remember the commands.

Any help much appreciated, cheers guys.

Hawker
 
robocopy source dest /e /mt /purge /zb /r:2 /w:2 /log:logfilename

stick it in a .cmd file and schedule it or look at the /mon options on robocopy to specify a run after x changes to source or x minutes if a change has occured to source. This will copy all from source to dest and remove and files from dest that don't exist on source
 
Cool thanks malman, ive just done some reading on the robocopy command, any reason I cant do:

robocopy source dest /MIR /mt /zb /r:2 /w:2 /log:logfilename

?

Cheers

Hawker

edit: also where do the log files get outputted to?
 
Last edited:
set the /log to /log:c:\temp\backuplog.txt and thats where it goes

source and dest can be a drive letter or folder

/mir is the same as /e and /purge if I remember correctly

if I wanted all of d: to be copied to e: and then any subsequent deletes from d: to be deleted from e: with the logfile stored in c:\temp the I would use

robocopy d: e: /mir /mt /zb /r:2 /w:2 /log:c:\temp\copy.txt

When I run this the second time only the differnces between d: and e: are processed - new files or changed files on d: are copied to e: files deleted on d: are deleted on e: and (DANGER DANGER) any files added to e: that aren't on d: gets deleted from e:

just be carefull with /mir and /purge (especially when copying drives rather than folders) as it will remove any file on the destination that does not exist on the source. if you copy from folder to folder then anything in the dest folder not in the source folder gets deleted. if you copy from source drive to dest drive then anything on the dest drive not on the source gets deleted - stuff you had on there before you even decide to do a backup to it gets removed. I tend to avoid drive to drive and alwys use folder to folder or drive to folder as its safer when using mir or purge.

you can use the /l option which will just do a list to the log of what it would do with the options you have set if you want to check your script before running it for real. Comes in handy sometimes

edit:
forgot to mention /zb needs backup user rights so you need to run it elevated on vista and windows7 etc (runas admin). you may not need the /zb anyway as it depends on what you are copying and whether you have direct access to it
 
Last edited:
Hey malman,

Thanks again for that, very useful, im going to run it as you've laid it out and then task schedule it to run daily at some low usage period.

Thanks very much for your help again.

Hawker
 
Back
Top Bottom