Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have created a simple batch file script for running Robocopy. It is set to make a backup of my user account folder to my external hard drive.

Here's the parameters for Robocopy:

ROBOCOPY "C:\Users\Finnly" "F:\Backups\Finnly (Backup)" /ZB /COPY:DAT /DCOPY:T /MIR /256 /MT:32 /XF ... /XD ... /R:3 /W:10 /V /TS /FP /ETA /LOG+:F:\Backups\Sync.log /TEE

For some reason when I run it, it backs up the files and then it seems to back them up again. The size of my user account directory is 18.3 GB but the backup of it occupies over 30 GB. After reading the contents of the log generated, it is obvious that it's copying files more than once. Why is this happening?

I'm running Windows Seven Home Premium 64-bit.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

I would suspect this is because Windows 7 has a lot of junction points for compatibility with older operating systems (eg My Music points to Music, My Pictures to Pictures etc).

If you add the /XJ switch, this will exclude the junction points. However that could mean that you are not backing up everything you think, especially if there is a junction point inside C:\Users\Finnly which points to somewhere outside that folder.

share|improve this answer
    
I modified the parameters to include the /XJ switch and it worked like a charm. The final size of the backup was 16.2 GB which is less than my actual user folder because I had excluded folders and files. I double-checked everything and I didn't miss any files or folders from junction points that are pointed outside the folder. Thanks for your help! –  Aznfin May 31 '10 at 22:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.