ROBOCOPY - Create Backup Script

How to Create a Backup Script using ROBOCOPY Command


   Information
There are many paid and free software solutions available to backup critical data and files on a computer system. Many users, however, are unaware of an inbuilt Windows 7 command called ROBOCOPY (Robust File Copy) that allows users to create simple or highly advanced backup strategies.


In its simplist form, ROBOCOPY can be likened to an extension of XCOPY on steroids. Some of the more important features that make ROBOCOPY an attractive backup alternative are:
  • multi-threaded copying
  • mirroring or synchronisation mode between the destination and source
  • automatic retry and copy resumption
The examples shown below are primarily geared towards less experienced users, especially those that are unfamilar with batch file creation and running. More experienced users, however, are welcome to explore some of the advanced functionality offered by ROBOCOPY here:

http://technet.microsoft.com/en-us/library/cc733145(WS.10).aspx

and also here:

http://www.theether.net/download/Microsoft/Utilities/robocopy.pdf

or by simply typing robocopy /? at a cmd window prompt.


   Note
ROBOCOPY is a FOLDER copier, not a FILE copier - the source and destination syntax arguments in ROBOCOPY can only be folder names.


:note: Creating a BACKUP strategy

The easiest way to use the ROBOCOPY command to create a backup strategy is by creating a batch (.BAT) file. A batch file is a simple text file, that when executed, runs several commands one after the other.

Step 1

Click :orb: and in the search box, type notepad. Select Notepad to open up a new blank Notepad document.


Step 2

Type the ROBOCOPY commands into the Notepad document, save it as a .BAT file, and then execute it.

In the example below, I have 3 folders (Data1, Data2, and Data3) containing some data that I wish to backup. One folder is located on E: drive and the other two are located on F: drive. I wish to back these up as follows:

Data1 folder on E: backup to a folder called Backups on G: (external USB drive)
Data2 folder on F: backup to a folder called Backups on G: (external USB drive)
Data3 folder on F: backup to a folder called Backups on Q: (network storage drive)

The general format of the ROBOCOPY command is:

Code:
robocopy <source> <destination> <options>
In the empty Notepad document, the simplist form of the command would look like this:

Code:
robocopy E:\Data1 G:\Backups\Data1
robocopy F:\Data2 G:\Backups\Data2
robocopy F:\Data3 Q:\Backups\Data3
pause
   Tip
If source or destination paths contain spaces in them, enclose these in double quotes e.g. "C:\My Data\My Music"



Only the source
  • E:\Data1
  • F:\Data2
  • F:\Data3
and the destination
  • G:\Backups\Data1
  • G:\Backups\Data2
  • Q:\Backups\Data3
are mandatory inputs into the ROBOCOPY command.

   Tip
The PAUSE command at the bottom of the .BAT file allows the cmd window to stay open after it has completed to allow me to see the output from ROBOCOPY.


If I save the .BAT file to my Desktop, and run it by double-clicking it, then a cmd window is opened and the .BAT file executes the three ROBOCOPY commands as shown below.

R1.JPG

The same information is repeated for every ROBOCOPY line in the .BAT file.




In order to utilise some of the powerful functionality in ROBOCOPY, I need to utilise some options in the ROBOCOPY command line. In this next example I want to edit my existing backup strategy such that:
  1. All sub-folders within my data folders are backed up, even if they are empty.
  2. The backup only copies newer files to my existing backup - this means a faster backup time.
  3. The percentage progress counter for copying is not shown - this neatens the overall appearance of the ROBOCOPY information, and creates a smaller log file.
  4. The information normally echoed to the cmd window is saved to a log file that I can examine at a later stage.
In order to do this, I need to specify some additional options in my ROBOCOPY commands like this:

Code:
robocopy E:\Data1 G:\Backups\Data1 [B][COLOR=red]/e /mir /np /log:backup_log.txt[/COLOR][/B]
robocopy F:\Data2 G:\Backups\Data2 [B][COLOR=red]/e /mir /np /log+:backup_log.txt[/COLOR][/B]
robocopy F:\Data3 Q:\Backups\Data3 [B][COLOR=red]/e /mir /np /log+:backup_log.txt[/COLOR][/B]
pause
Where:
/e = copy all sub-folders, even empty ones
/mir = mirror (check the files in the destination, and only copy newer files)
/np = no progress counter
/log: = create a logfile

   Tip

Note the use of the /log+: option in the 2nd and 3rd line of the .BAT file. This option ensures that the results of the 2nd and 3rd ROBOCOPY are appended to the log file created in the 1st ROBOCOPY line, meaning I only need one log file to capture all the information I backup.

The log file is always saved to the same folder as the .BAT file - in my case, the folder is saved to my Desktop.


Since the output from ROBOCOPY is written to the log file, the cmd window will not display the output from ROBOCOPY. If I wish to have this information written to both the log file and the cmd window for visual tracking of the backup process, then I can add the /tee option to each line in the .BAT file, as shown below.

Code:
robocopy E:\Data1 G:\Backups\Data1 /e /mir /np [B][COLOR=red]/te[/COLOR][COLOR=red]e[/COLOR][/B] /log:backup_log.txt
robocopy F:\Data2 G:\Backups\Data2 /e /mir /np [COLOR=red][B]/tee[/B][/COLOR] /log+:backup_log.txt
robocopy F:\Data3 Q:\Backups\Data3 /e /mir /np[COLOR=red][B] /tee[/B][/COLOR] /log+:backup_log.txt
pause
This is an example of the typical output to the the log file - it looks exactly the same as what is echoed to the cmd window.

Code:
-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows                              
-------------------------------------------------------------------------------
  Started : Sun Sep 18 23:35:01 2011
   Source : E:\Data1\
     Dest : G:\Backups\Data1\
    Files : *.*
 
  Options : *.* /S /E /COPY:DAT /PURGE /MIR /R:1000000 /W:30 
------------------------------------------------------------------------------
                    2 E:\Data1\
------------------------------------------------------------------------------
               Total    Copied   Skipped  Mismatch    FAILED    Extras
    Dirs :         1         0         1         0         0         0
   Files :         2         0         2         0         0         0
   Bytes :   442.1 k         0   442.1 k         0         0         0
   Times :   0:00:00   0:00:00                       0:00:00   0:00:00
   Ended : Sun Sep 18 23:35:01 2011
Since one of the data folders I am backing up is being copied across a network, I want to ensure that any possible network outages do not cause some critical files to be skipped in the backup. To do this, I can make use of the /z option in the 3rd line of my .BAT file (backup to my network storage) as shown below.

Code:
robocopy E:\Data1 G:\Backups\Data1 /e /mir /np /tee /log:backup_log.txt
robocopy F:\Data2 G:\Backups\Data2 /e /mir /np /tee /log+:backup_log.txt
robocopy F:\Data3 Q:\Backups\Data3 /e /mir /np [B][COLOR=red]/z[/COLOR][/B] /tee /log+:backup_log.txt
This option implements a "retry" for the copying. If I were part way through the copying process, and I lost connection with the network, then ROBOCOPY would automatically restart the copying at the point of failure once the network connection was re-established. It would retrying a million times every 30 seconds (the default settings shown in the image above). The only drawback with this option, is that it can significantly increase the backup time.

ROBOCOPY also has the ability to perform faster multi-threaded copying by simply using the option /mt. I can choose the number of threads to use by specifying a number between 1 and 128 after the /mt option, or if I just specify /mt without a number then the it will use 8 threads by default. In the example below, I use 4 threads to copy to my USB drive, and 8 threads (no number) to copy to my network drive.

Code:
robocopy E:\Data1 G:\Backups\Data1 /e /mir /np /tee [B][COLOR=red]/mt:4[/COLOR][/B] /log:backup_log.txt
robocopy F:\Data2 G:\Backups\Data2 /e /mir /np /tee [COLOR=red][B]/mt:4[/B][/COLOR] /log+:backup_log.txt
robocopy F:\Data3 Q:\Backups\Data3 /e /mir /np [COLOR=black]/z[/COLOR] /tee [COLOR=red][B]/mt[/B][/COLOR] /log+:backup_log.txt
Below is a template that you can use to create your own backup strategy using ROBOCOPY. Simply copy and paste the lines into a blank text document, and then edit as appropriate.

Code:
rem --- Edit the lines below to create your own backup strategy
rem --- The /mir option has been left out for safety sake
rem --- Add more lines for each new folder requiring backup
rem --- Specified 4 threads to use for multi-threaded copying
rem --- The results of the backup can be found in my_backup_log.txt 
robocopy <source> <destination> /e /np /tee /mt:4 /log:my_backup_log.txt
robocopy <source> <destination> /e /np /tee /mt:4 /log+:my_backup_log.txt
robocopy <source> <destination> /e /np /tee /mt:4 /log+:my_backup_log.txt
pause
   Tip

The can automate your backup's by using the Windows 7 Task Scheduler to run the .BAT file at specific times.

For more information please refer to this tutorial by Orbital Shark:
http://www.sevenforums.com/tutorials/12444-task-scheduler-create-new-task.html


I hope this brief tutorial helps you access the power and simplicity of ROBOCOPY to create some effective backup strategies.

Regards,
Golden
 
Last edited by a moderator:
Script Help

Hi, I'm new to using robocopy and want some assistance.

First of all, I've managed to create a script based on the first example that will copy files from two different sources to two different destinations using an example from the OP. This is what I am currently using.

Code:
robocopy "C:\Users\Josh\Documents\Backup Files" "F:\Backup Files" /e /mir /np /log:backup_log.txt
robocopy "C:\Users\Public\Recorded TV" "F:\Recorded TV" /e /mir /np /log+:backup_log.txt
pause
A couple things:

  • With the first folder, Backup Files, I will be continuously adding files to the source. Occasionally, I want to update the destination, Backup Files on my external drive, leaving both source and destination files intact. Files will never be saved in the destination folder, only the source folder, then copied over when a backup is performed.
  • With the second folder, Recorded TV, I am wanting to MOVE files from one destination to the other, IF the file contains the names "Program 1", "Program 2", "Program 3" (as an example). Otherwise, I only want to copy (NOT move) the rest of the contents over, leaving it in both source and destination.
If I can get some help on this, thanks in advance.
 

My Computer

Computer Manufacturer/Model Number
N/A
OS
Windows 7 Ultimate 64-bit
CPU
E6750 OC'd ~ 2.9 Mhz
Motherboard
P5N-E
Memory
DDR2 800 MHz 4GB
Graphics Card(s)
GTX 460 SE 1GB
Sound Card
Realtek Audio (Onboard sound)
Hard Drives
Seagate 500 GB HD
PSU
750 watt
Hi,

The first line of the script will work fine for your first case - keeping "Backup Files" synchronised between F: and C:.

The second request is more complex as it's conditional to the existence of a name of a recorded program - how will the script know the name of the program?

Regards,
Golden
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Golden Mk. I.4
OS
Windows 10 Pro x64 ; Xubuntu x64
CPU
Intel i7 860 @ 2.80 GHz O/C'ed to 4.0GHz
Motherboard
Gigabyte P55A-UD3R Rev.1. Award BIOS F13
Memory
16GB Corsair Vengance DDR3 @ 661 MHz Dual Channel (9-9-9-24)
Graphics Card(s)
EVGA NVidia GTX 560 1024MB
Sound Card
Realtek Integrated
Monitor(s) Displays
Dual Samsung SyncMaster 2494HS
Screen Resolution
1920*1080 and 1920*1080
Hard Drives
1*Samsung 840 EVO 120GB SSD;
1*OCZ Vertex 2 60GB SSD;
2*Samsung F3 SpinPoint 1TB in RAID0;
1*Samsung F1 SpinPoint 1TB;
2*Western Digital 1TB External USB 3.0
1*Western Digital 500GB External USB 3.0
1*Seagate 500GB External USB 2.0
PSU
Thermaltake ToughPower QFan 750W
Case
Thermaltake Element S VK60001W2Z
Cooling
Corsair H60 Water Cooling, 2*230mm and 2*80mm case fans
Keyboard
Logitech G110
Mouse
Logitech MX518
Golden, please, a little help, you seem to be the man. Strange issue using robocopy, it acts like its copying everything, but when i look in the folder, its empy. Yet other command lines work fine.

Example:this line wont work:

robocopy "C:\users\andysdad\My Documents" "e:\backup\My Documents" /S /A

But this line will:

robocopy "c:\users\andysdad\downloads" "e:\backup\downloads" /S /A

???
 

My Computer

OS
Win 7 64 bit
Hi,

I'll have a look at this when I get home this evening, and post back here.

Regards,
Golden
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Golden Mk. I.4
OS
Windows 10 Pro x64 ; Xubuntu x64
CPU
Intel i7 860 @ 2.80 GHz O/C'ed to 4.0GHz
Motherboard
Gigabyte P55A-UD3R Rev.1. Award BIOS F13
Memory
16GB Corsair Vengance DDR3 @ 661 MHz Dual Channel (9-9-9-24)
Graphics Card(s)
EVGA NVidia GTX 560 1024MB
Sound Card
Realtek Integrated
Monitor(s) Displays
Dual Samsung SyncMaster 2494HS
Screen Resolution
1920*1080 and 1920*1080
Hard Drives
1*Samsung 840 EVO 120GB SSD;
1*OCZ Vertex 2 60GB SSD;
2*Samsung F3 SpinPoint 1TB in RAID0;
1*Samsung F1 SpinPoint 1TB;
2*Western Digital 1TB External USB 3.0
1*Western Digital 500GB External USB 3.0
1*Seagate 500GB External USB 2.0
PSU
Thermaltake ToughPower QFan 750W
Case
Thermaltake Element S VK60001W2Z
Cooling
Corsair H60 Water Cooling, 2*230mm and 2*80mm case fans
Keyboard
Logitech G110
Mouse
Logitech MX518
OK. Can you try this again:

robocopy "C:\users\andysdad\My Documents" "e:\backup\My Documents" /S /A

and then copy & paste the contents from the output screen here?

Regards,
Golden
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Golden Mk. I.4
OS
Windows 10 Pro x64 ; Xubuntu x64
CPU
Intel i7 860 @ 2.80 GHz O/C'ed to 4.0GHz
Motherboard
Gigabyte P55A-UD3R Rev.1. Award BIOS F13
Memory
16GB Corsair Vengance DDR3 @ 661 MHz Dual Channel (9-9-9-24)
Graphics Card(s)
EVGA NVidia GTX 560 1024MB
Sound Card
Realtek Integrated
Monitor(s) Displays
Dual Samsung SyncMaster 2494HS
Screen Resolution
1920*1080 and 1920*1080
Hard Drives
1*Samsung 840 EVO 120GB SSD;
1*OCZ Vertex 2 60GB SSD;
2*Samsung F3 SpinPoint 1TB in RAID0;
1*Samsung F1 SpinPoint 1TB;
2*Western Digital 1TB External USB 3.0
1*Western Digital 500GB External USB 3.0
1*Seagate 500GB External USB 2.0
PSU
Thermaltake ToughPower QFan 750W
Case
Thermaltake Element S VK60001W2Z
Cooling
Corsair H60 Water Cooling, 2*230mm and 2*80mm case fans
Keyboard
Logitech G110
Mouse
Logitech MX518
I will

As soon as i get home later today, thanks much
 

My Computer

OS
Win 7 64 bit
No worries - I'll keep visiting back here to check it out.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Golden Mk. I.4
OS
Windows 10 Pro x64 ; Xubuntu x64
CPU
Intel i7 860 @ 2.80 GHz O/C'ed to 4.0GHz
Motherboard
Gigabyte P55A-UD3R Rev.1. Award BIOS F13
Memory
16GB Corsair Vengance DDR3 @ 661 MHz Dual Channel (9-9-9-24)
Graphics Card(s)
EVGA NVidia GTX 560 1024MB
Sound Card
Realtek Integrated
Monitor(s) Displays
Dual Samsung SyncMaster 2494HS
Screen Resolution
1920*1080 and 1920*1080
Hard Drives
1*Samsung 840 EVO 120GB SSD;
1*OCZ Vertex 2 60GB SSD;
2*Samsung F3 SpinPoint 1TB in RAID0;
1*Samsung F1 SpinPoint 1TB;
2*Western Digital 1TB External USB 3.0
1*Western Digital 500GB External USB 3.0
1*Seagate 500GB External USB 2.0
PSU
Thermaltake ToughPower QFan 750W
Case
Thermaltake Element S VK60001W2Z
Cooling
Corsair H60 Water Cooling, 2*230mm and 2*80mm case fans
Keyboard
Logitech G110
Mouse
Logitech MX518
Test

Lunch time test gives the error "error 5 (0x00000005) accessing source directory c:\users\andysdad\My Documents\

Access is denied.
 

My Computer

OS
Win 7 64 bit
Sorry , forgot to run as Admin.
Again usb drive started flashing like it was copying something, but nothing in backup directory, output

dirs: total468 copied25 skipped443
files 7956 copied 6 skip[ped 9750
bytes total 16.101g copied 234.29
 

My Computer

OS
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 Computer

OS
Win 7 64 bit
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:

http://www.sevenforums.com/tutorials/180324-system-info-see-your-system-specs.html

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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Golden Mk. I.4
OS
Windows 10 Pro x64 ; Xubuntu x64
CPU
Intel i7 860 @ 2.80 GHz O/C'ed to 4.0GHz
Motherboard
Gigabyte P55A-UD3R Rev.1. Award BIOS F13
Memory
16GB Corsair Vengance DDR3 @ 661 MHz Dual Channel (9-9-9-24)
Graphics Card(s)
EVGA NVidia GTX 560 1024MB
Sound Card
Realtek Integrated
Monitor(s) Displays
Dual Samsung SyncMaster 2494HS
Screen Resolution
1920*1080 and 1920*1080
Hard Drives
1*Samsung 840 EVO 120GB SSD;
1*OCZ Vertex 2 60GB SSD;
2*Samsung F3 SpinPoint 1TB in RAID0;
1*Samsung F1 SpinPoint 1TB;
2*Western Digital 1TB External USB 3.0
1*Western Digital 500GB External USB 3.0
1*Seagate 500GB External USB 2.0
PSU
Thermaltake ToughPower QFan 750W
Case
Thermaltake Element S VK60001W2Z
Cooling
Corsair H60 Water Cooling, 2*230mm and 2*80mm case fans
Keyboard
Logitech G110
Mouse
Logitech MX518
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 Computer

OS
Win 7 Ultimate 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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Golden Mk. I.4
OS
Windows 10 Pro x64 ; Xubuntu x64
CPU
Intel i7 860 @ 2.80 GHz O/C'ed to 4.0GHz
Motherboard
Gigabyte P55A-UD3R Rev.1. Award BIOS F13
Memory
16GB Corsair Vengance DDR3 @ 661 MHz Dual Channel (9-9-9-24)
Graphics Card(s)
EVGA NVidia GTX 560 1024MB
Sound Card
Realtek Integrated
Monitor(s) Displays
Dual Samsung SyncMaster 2494HS
Screen Resolution
1920*1080 and 1920*1080
Hard Drives
1*Samsung 840 EVO 120GB SSD;
1*OCZ Vertex 2 60GB SSD;
2*Samsung F3 SpinPoint 1TB in RAID0;
1*Samsung F1 SpinPoint 1TB;
2*Western Digital 1TB External USB 3.0
1*Western Digital 500GB External USB 3.0
1*Seagate 500GB External USB 2.0
PSU
Thermaltake ToughPower QFan 750W
Case
Thermaltake Element S VK60001W2Z
Cooling
Corsair H60 Water Cooling, 2*230mm and 2*80mm case fans
Keyboard
Logitech G110
Mouse
Logitech MX518
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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Homebrew Intel 6600-based
OS
Win 7/Pro 64-bit
CPU
Intel 6600 Quad
Motherboard
eVGA 780i
Memory
8 GB DDR2
Graphics Card(s)
EVGA 512 9500 GT + nVidia GT
Monitor(s) Displays
4: (1) HP 22"W + (2) 19" + (1) 15" (pgm. icons only)
Hard Drives
SanDisk 120GB SSD (sys+pgms);WD Raptor 150GB (sys/pgm backup). Also, two of Seagate Barracuda ES.2's (data + backup)) and WD Raptor 150GB (spare)
Case
Cooler Master CM Cosmose 1000 (tower)
Keyboard
MS Natural (desktop)
Mouse
Logitech Performance Lase Wireless Mouse
Internet Speed
17 Mbs download (cable)
Antivirus
MS Defender
Other Info
Windows Experience Index on tower system: 7.1/7.1/6.9/6.9/7.0
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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Golden Mk. I.4
OS
Windows 10 Pro x64 ; Xubuntu x64
CPU
Intel i7 860 @ 2.80 GHz O/C'ed to 4.0GHz
Motherboard
Gigabyte P55A-UD3R Rev.1. Award BIOS F13
Memory
16GB Corsair Vengance DDR3 @ 661 MHz Dual Channel (9-9-9-24)
Graphics Card(s)
EVGA NVidia GTX 560 1024MB
Sound Card
Realtek Integrated
Monitor(s) Displays
Dual Samsung SyncMaster 2494HS
Screen Resolution
1920*1080 and 1920*1080
Hard Drives
1*Samsung 840 EVO 120GB SSD;
1*OCZ Vertex 2 60GB SSD;
2*Samsung F3 SpinPoint 1TB in RAID0;
1*Samsung F1 SpinPoint 1TB;
2*Western Digital 1TB External USB 3.0
1*Western Digital 500GB External USB 3.0
1*Seagate 500GB External USB 2.0
PSU
Thermaltake ToughPower QFan 750W
Case
Thermaltake Element S VK60001W2Z
Cooling
Corsair H60 Water Cooling, 2*230mm and 2*80mm case fans
Keyboard
Logitech G110
Mouse
Logitech MX518
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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Homebrew Intel 6600-based
OS
Win 7/Pro 64-bit
CPU
Intel 6600 Quad
Motherboard
eVGA 780i
Memory
8 GB DDR2
Graphics Card(s)
EVGA 512 9500 GT + nVidia GT
Monitor(s) Displays
4: (1) HP 22"W + (2) 19" + (1) 15" (pgm. icons only)
Hard Drives
SanDisk 120GB SSD (sys+pgms);WD Raptor 150GB (sys/pgm backup). Also, two of Seagate Barracuda ES.2's (data + backup)) and WD Raptor 150GB (spare)
Case
Cooler Master CM Cosmose 1000 (tower)
Keyboard
MS Natural (desktop)
Mouse
Logitech Performance Lase Wireless Mouse
Internet Speed
17 Mbs download (cable)
Antivirus
MS Defender
Other Info
Windows Experience Index on tower system: 7.1/7.1/6.9/6.9/7.0
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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Golden Mk. I.4
OS
Windows 10 Pro x64 ; Xubuntu x64
CPU
Intel i7 860 @ 2.80 GHz O/C'ed to 4.0GHz
Motherboard
Gigabyte P55A-UD3R Rev.1. Award BIOS F13
Memory
16GB Corsair Vengance DDR3 @ 661 MHz Dual Channel (9-9-9-24)
Graphics Card(s)
EVGA NVidia GTX 560 1024MB
Sound Card
Realtek Integrated
Monitor(s) Displays
Dual Samsung SyncMaster 2494HS
Screen Resolution
1920*1080 and 1920*1080
Hard Drives
1*Samsung 840 EVO 120GB SSD;
1*OCZ Vertex 2 60GB SSD;
2*Samsung F3 SpinPoint 1TB in RAID0;
1*Samsung F1 SpinPoint 1TB;
2*Western Digital 1TB External USB 3.0
1*Western Digital 500GB External USB 3.0
1*Seagate 500GB External USB 2.0
PSU
Thermaltake ToughPower QFan 750W
Case
Thermaltake Element S VK60001W2Z
Cooling
Corsair H60 Water Cooling, 2*230mm and 2*80mm case fans
Keyboard
Logitech G110
Mouse
Logitech MX518
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 Computer

OS
Windows 7 32 and 64 bit
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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Golden Mk. I.4
OS
Windows 10 Pro x64 ; Xubuntu x64
CPU
Intel i7 860 @ 2.80 GHz O/C'ed to 4.0GHz
Motherboard
Gigabyte P55A-UD3R Rev.1. Award BIOS F13
Memory
16GB Corsair Vengance DDR3 @ 661 MHz Dual Channel (9-9-9-24)
Graphics Card(s)
EVGA NVidia GTX 560 1024MB
Sound Card
Realtek Integrated
Monitor(s) Displays
Dual Samsung SyncMaster 2494HS
Screen Resolution
1920*1080 and 1920*1080
Hard Drives
1*Samsung 840 EVO 120GB SSD;
1*OCZ Vertex 2 60GB SSD;
2*Samsung F3 SpinPoint 1TB in RAID0;
1*Samsung F1 SpinPoint 1TB;
2*Western Digital 1TB External USB 3.0
1*Western Digital 500GB External USB 3.0
1*Seagate 500GB External USB 2.0
PSU
Thermaltake ToughPower QFan 750W
Case
Thermaltake Element S VK60001W2Z
Cooling
Corsair H60 Water Cooling, 2*230mm and 2*80mm case fans
Keyboard
Logitech G110
Mouse
Logitech MX518
Back
Top