Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: ROBOCOPY - Create Backup Script

17 May 2012   #70
Andysdad

Win 7 64 bit
 
 

You are free, this isnt a robocopy problem. I deleted the backup folder, ran your command line. Backed up 16 gigs . I access drive and do properties , 16 gigs, open folder, empty.Ive been resetting security right and all, its not empty, i just cant see it. Thanks for your help


My System SpecsSystem Spec
.
18 May 2012   #71
Golden
Microsoft MVP

Windows 7 Ult. x64
 
 

No worries Andy, although I would be happier if you were able to see the contents.

Can I make a suggestion?

Make a new thread under the General Discussion area, posting as much detail about the drive and also your system. Use this to gather the information:

System Info - See Your System Specs

I am confident that this will be solved very quickly. In fact, I'll get some specialists in this area to look at it for you if you like.

Regards,
Golden
My System SpecsSystem Spec
25 May 2012   #72
bls

Win 7 Ultimate x64
 
 
robocopy /mir switch

Hi Golden

Just curious... If someone is running a task and using the /mir option and decides to plug in a new backup device (larger HDD for instance) which happens to be freshly formatted, will that wipe their whole source directory or is there some sort of destination checking that happens first?

Thanks
B
My System SpecsSystem Spec
25 May 2012   #73
Golden
Microsoft MVP

Windows 7 Ult. x64
 
 

Hi,

No, the source directory stays intact since there is no destination against which to mirror.

All that happens in this case, is that the source directory is copied to the newly formattted destination device - in effect the /mir switch is ignored since there is nothing to mirror.

The secret to working with the /mir switch is this : if you have a folders or files that are no longer required as part of your backup, do the following:

1. Delete the folders/files at the SOURCE
2. Run ROBOCOPY to mirror the DESTINATION to the SOURCE

Never delete these folders/files at the backup, and then run ROBOCOPY - always follow steps 1 and 2 as shown above.

Regards,
Golden
My System SpecsSystem Spec
.

26 May 2012   #74
websquad

Win 7/Pro 64-bit
 
 
Robocopy: Access Denied

Golden, here is my batch file:
robocopy e: f: /E /tee /log:f:/robocopy.log /mt
pause

As it progresses I get the following error message:

*EXTRA Dir -1 F:\MSOCache\
2012/05/26 20:48:19 ERROR 5 (0x00000005) Accessing Destination Directory F:\$RECYCLE.BIN\
Access is denied.
Waiting 30 seconds...


My system drive is C: ... I use the Western Digital version of Acronis True Image to back it up to D: (with success ... my BIOS let's me boot from any disk drive).

E: is my data drive, and F: is my backup to E:.

Any suggestions?
My System SpecsSystem Spec
26 May 2012   #75
Golden
Microsoft MVP

Windows 7 Ult. x64
 
 

Hi,

There is no need to backup the Recycle bin, Windows treats that differently from other user folders, which is why I suspect you are getting that message.

My suggestion is to re-structure your script to only backup the folders you require (e.g. Music, Photos etc. etc.).

Regards,
Golden
My System SpecsSystem Spec
28 May 2012   #76
websquad

Win 7/Pro 64-bit
 
 
This is what I ended up using ....

Thanks for your help .... this is what I ended up using:

robocopy e:"/2010-06-Facebook" f: /e /np /tee /mt:4 /log:f:/my_backup_log.txt
robocopy e:"@ Interim from Samsung" f: /e /np /tee /mt:4 /log+:f:/my_backup_log.txt
robocopy e:"@ LexSing" f: /e /np /tee /mt:4 /log+:f:/my_backup_log.txt
robocopy e:"@MyStuff" f: /e /np /tee /mt:4 /log+:f:/my_backup_log.txt
robocopy e:"@Websites" f: /e /np /tee /mt:4 /log+:f:/my_backup_log.txt


.... and so on, for 55 additional main sub-directories... the whole bunch followed by

pause

The final log file has 218,725 lines. That is several times more that what I expected. Drive E uses 198 GB; Drive F uses uses 393GB. From the log there are a lot of files labeled "New File" and there are also a lot of files labeled "*EXTRA Dir" ...

I'm confused !!
My System SpecsSystem Spec
28 May 2012   #77
Golden
Microsoft MVP

Windows 7 Ult. x64
 
 

Hi,

"New File" are files that exist on your source, but not on the destination, so they are copied to the destination.

"Extra Dir" are directories that exist on your destination, but not on the source, so they are deleted from the destination.

Regards,
Golden
My System SpecsSystem Spec
22 Jun 2012   #78
Hugh Jasse

Windows 7 32 and 64 bit
 
 

Hi Golden

This thread has been a life saver. I have been tasked with figuring out a windows 7 profile backup strategy. It appears the powers that be do not wish to use roaming profiles and folder redirection. I have tried many things, but nothing has really worked with the exception of "windows easy transfer". Any other procedure fails to restore the profile correctly.

After I back up the profile to a usb drive ( i am experimenting on a non domain laptop.) I delete the user profile from the profiles tab, the local user account still exists. I then restore the profile from a local admin account. Logging back in as the user whose profile was deleted, however, only gives me the default profile. All my icons, desktop background etc are missing. The implementation, if I can get it working, would be in a domain environment where I would want to use a batch file and scheduled task to back the user's profile up to a network share on a nightly basis, using the /mir switch to do incremental copies. I would need to be able to restore the user profile exactly as it was should some type of corruption or other catastrophy arise, or if the user has a hardware failure.

Is there a way to script this so it would log in as the domain admin and copy the current logged in user's profile completely? Woul

would using robocopy to restore the profile preserve all the user's customizations?

Thank you in advance for your consideration.
My System SpecsSystem Spec
22 Jun 2012   #79
Golden
Microsoft MVP

Windows 7 Ult. x64
 
 

Hi Hugh and welcome to SevenForums,

Mmm. An interesting problem. So, the user will be logged off at the time that the .BAT file runs? I don't see an issue as long as ROBOCOPY has the appropriate permissions (/COPY options). As for logging in as domain admin, I'm not really sure about that.....

I'll see if I can find someone a bit more experienced to have a look at this for you.

Regards,
Golden
My System SpecsSystem Spec
Comment

 ROBOCOPY - Create Backup Script




Tutorial Tools Search this Tutorial
Search this Tutorial:

Advanced Search




Similar help and support threads
Windows 7 Tutorial Category
robocopy script is not working through Scheduler
Dear All, My batch file of robocopy is working fine. But when I tried to run it through task scheduler, none of the files transfer to the target location. @echo off echo +-----------------------------------------+ echo Database Export Utility for server ...
General Discussion
Robocopy Backup - ERROR 5 (0x00000005)
Hi, I'm wondering if anyone might be able to shed some light on why I am getting the following such errors when running a robocopy batch file (as administrator) which cause the backup script to stall (- albeit temporarily): I am using the following backup command: robocopy "%srcPath%\My...
Backup and Restore
How 2 create a script/BAT or something that changes my desktop image?
Okay so I just got this program called Transparent Screen Lock and you can run files when the program starts/locks and closes/unlocks. What I would like to do is create a script or something that changes my desktop background to an image when I click "lock" and another script to change the desktop...
Customization
Robocopy backup for personal folders
I have created a batch file for copying my Documents folder to an external hard drive: The log file shows that it is backing up C:\users\USERNAME\documents\My Music and C:\users\USERNAME\documents\My Pictures. That's fine, because I want those backed up anyway, but when I go to...
Backup and Restore
I Need Help To Create REG. Script With Admin. Priv. For Reg. Editor?
Hello. I have a technical question/issue I wish to ask. I hope someone can help me. I am looking help for someone to modify or rewrite for me a simple system registry script for my context menu that allows or forces to "run as administrator" privileges automatically when I click on the...
Customization
Anyone use robocopy to backup?
Evening all, Just curious to know if anyone uses the built in utility to backup software on your machine, im trying to backup my itunes folder to an external HD but having a few issues to get this to work properly! I also use sync toy for backing up but just really want to know what everyone...
Backup and Restore


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 09:37.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App