|
| ||||||||||
| Tags: drive, flash drive, parameter, robocopy, server |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
Robocopy script mirror from one computer to the next
The problem is best explained by this example: 1. I run the program daily on a certain computer. 2. I also run this program every once in a while on different computers so these other computers don't have everything new all the time. When I run it on these other computers they backup the entire drive and not just what is new. 3. when I run this program again on the daily computer after running it some where else it again backs up everything regardless of whats on the computer that is the same as on the flash so to sum it up when ever I change computers and backup it backs up everything, instead of just what is new from the last time I backed it up on that computer, and then when I go back to my PC i use regularly it backs up everything all over agian even though nothing has changed. I beleive it has to be something with the arichive bit being reset...but I thought robocopy was looking at dates last modified / created not just an archive bit. any help would be great! here is the robocopy switches/parameters I am using and a sample of part of the program: set source=%drivePath% set dest=C:\%user% set what= /COPYALL /B /MIR :: /COPYALL COPY ALL file info :: /B copy files in Backup mode. :: /SEC copy files with SECurity :: /MIR MIRror a directory tree set options=/R:0 /W:0 /LOG:%drivePath%\logs\Robo-log.txt /NDL /NP /TEE /XO :: /R:n number of Retries :: /W:n Wait time between retries :: /LOG Output log file :: /NDL No dir logging so it doesn't show all directories (shows everything on the flash) :: /NP No Progress – don’t display % copied. :: /TEE display on screen while logging :: /XO If destination has the same file as source with the same date or newer then nothing is copied from source to destination echo ### Mirroring... ::robocopy command pulling variables from above ROBOCOPY %source% %dest% %what% %options% Last edited by Foremore : 15-11-2011 at 08:22 PM. |
|
#2
| ||||
| ||||
| Re: Robocopy script mirror from one computer to the next
Can you tell us how is it running now? As a scheduled task? If so, put the scheduled task on hold, edit the script, then unhold the task. There is also a utility that does all the hard work for your and that is called RoboCopyPlus, simply download by searching it from google. It expands on 'native' ROBOCOPY, adding a few switches that let you email the results and logfile.
__________________ Education, Career and Job Discussions |
|
#3
| |||
| |||
| Re: Robocopy script mirror from one computer to the next
No this is not a scheduled task. I don't want to use another program since it would just be to many clicks. all this is is a batch file running whenever I click on it to backup my flash to the computer since a flash isn't reliable but its portable Can anyone tell me about the script and say why it would backup everything if I switch to a computer? Last edited by Foremore : 17-11-2011 at 01:17 AM. |
|
#4
| |||
| |||
| Re: Robocopy script mirror from one computer to the next
This may do your commandline. I am counting that you will not have spaces in your log file: Code: $prog = 'c:\script\robocopy' $source = '\\global-data-server\global\work\KA' $dest = 'c:\test' $what = '/COPYALL /B /SEC /MIR' $options = '/R:15 /W:53 /TBD /RH:0715-2359 /MOT:39' $logg = '/LOG+:C:\temp\_katastrofe_dok2.log /NFL /NDL' RunWait(@ComSpec & ' /c "' & $prog & '" "' & $source & '" "' & $dest & '" ' & $what & ' ' & $options & ' ' & $l |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Robocopy script mirror from one computer to the next" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Apple iPad 2 mirror image to computer | The$Tourist | Portable Devices | 11 | 29-04-2011 12:50 PM |
| Need vbs script to add computer in the domain (OU ) | lolo1790 | Windows Server Help | 10 | 04-03-2011 04:50 AM |
| Get computer name as variable to use in vbs script. | spacemancw | Windows Server Help | 5 | 30-01-2010 06:31 AM |
| Script to Rename Computer Name in Domain | skepper | Windows Server Help | 3 | 10-07-2009 10:05 AM |
| Startup Script restart computer | wwwguy1 | Windows Server Help | 1 | 09-03-2007 08:11 AM |