Simple robocopy script to backup a harddrive not working

1

2

I am trying to run robocopy to backup my whole harddrive

This what I have so far robocopy f: G:\Backup\f\ /E /R:2 /ZB /DCOPY:T /SL

The problem I have is that I seem to be geting into a loop where is is following the shortcuts and copy that at well and for some reason on the win7 build they are looping untill the path length breaks.

Has anybody got line that wordk or can tell what switch I have wrong?

Pbearne

Posted 2009-09-28T18:29:20.460

Reputation: 113

Answers

0

Try this:

robocopy /E /R:1 /W:1 /COPYALL /ETA "F:\\" "G:\Backup\f\\"

If you want a mirror backup to process deletes, add the /MIR after ETA. If you are copying to a drive that isnt NTFS, you will need /FFT as well.

TheDave1022

Posted 2009-09-28T18:29:20.460

Reputation: 26

3

The right switch is /XJ (exclude junction) to only copy and unfollow symlinks.

lightserver

Posted 2009-09-28T18:29:20.460

Reputation: 31

1

Remove the /SL switch. You don't need it.

I usually just use:

robocopy f: G:\Backup\f\ /MIR /R:2

Gordon Bell

Posted 2009-09-28T18:29:20.460

Reputation: 243

isn't the /mir for miror which will delte files in the backup e.g. sysnic the files? – None – 2009-09-28T18:51:09.107

1/SL:: copy symbolic links versus the target.

I add this to try stop robocopy the target content I should what the shortcut – None – 2009-09-28T18:54:00.770

Yes, don't use /MIR unless you want a mirror copy. The /SL is your problem. It's following/backing up the symbolic links, which you don't want. – Gordon Bell – 2009-09-28T19:51:11.193