ROBOCOPY - Create Backup Script

Page 26 of 32 FirstFirst ... 162425262728 ... LastLast

  1. Posts : 2
    Windows 7 Enterprise 64 bits
       #250

    Just spent the best part of this afternoon reading all 25 pages of this fantastic post. What an awesome guy "Golden" is and the patience of a saint.

    Anyway onto the question. I need to do some replication of data on a NAS drive, to an external USB drive hanging off a PC, so traffic is across the network after hours.

    I need to ensure the explicit copy of all permissions and security elements so that in the event we need to recover from the External to the NAS, all permissions are in place and cuts down on our workload.

    So basically copying from mapped drive H:\Users to mapped drive Q:\users

    what would be the best script to use to ensure I get all security permissions ?

    when the batch files run, there will be no other network traffic at all, and all files on other workstations will be closed down.

    In addition. Is there anyway I can run RoboCopy to just transfer the permissions from the source to the destination where files already exist.

    Previously I used RichCopy, to find out, that despite having all the advanced settings turned on, it didn't copy the permissions as it should.

    thanks
      My Computer


  2. Posts : 19,383
    Windows 10 Pro x64 ; Xubuntu x64
    Thread Starter
       #251

    Thanks for the compliments.

    Please try a test using this flag:

    Code:
     /COPY:DATSOU
      My Computer


  3. Posts : 1
    Windows 7 Professional 64
       #252

    I need a backup solution - i need to write a startup script to be inserted in our company laptops such that when a laptop connects to our network and detects our backup server, it should automatically start to backup data that are new or is there any free software available so that i can install as a backup and restore solution
      My Computer


  4. Posts : 3
    Windows 10 Pro x64
       #253

    Hello.

    I have been using Robocopy successfully for some time now, in a batch script in Windows 7 to copy files from a local file to a network mapped drive folder. A couple of weeks ago, I tried to use the same exact script (and Robocopy file version btw) in a Windows 10 machine and couldn't.

    This is basically my current command (variable %logfile% is dynamically filled before):
    @robocopy "D:\Backup" "Y:\Backup" /MIR /ZB /R:5 /V /FP /UNILOG:"%logfile%" /NP>nul

    which yields the following log file:
    -------------------------------------------------------------------------------
    ROBOCOPY :: Robust File Copy for Windows
    -------------------------------------------------------------------------------

    Started : friday, 16th of October 2015 16:17:38
    2015/10/16 16:17:38 ERROR 3 (0x00000003) Getting File System Type of Destination Y:\Backup\
    The system cannot find the path specified.


    Source : D:\Backup\
    Dest - Y:\Backup\

    Files : *.*

    Options : *.* /V /FP /S /E /DCOPY:DA /COPY:DAT /PURGE /MIR /ZB /NP /R:5 /W:30

    ------------------------------------------------------------------------------

    2015/10/16 16:17:38 ERROR 3 (0x00000003) Creating Destination Directory Y:\Backup\
    The system cannot find the path specified.

    I've read somewhere that this might be an bug in Windows 10, as the following command also fails all the time from the batch file:
    if NOT exist "Y:\Backup" goto:message2

    Can anyone provide any tips on how to overcome this error in robocopy (and how to check if a certain folder exists in a mapped network drive, in Windows 10 via batch file)?
      My Computer


  5. Posts : 19,383
    Windows 10 Pro x64 ; Xubuntu x64
    Thread Starter
       #254

    In Windows Explorer, is Y: the mapped network drive?
      My Computer


  6. Posts : 3
    Windows 10 Pro x64
       #255

    Golden said:
    In Windows Explorer, is Y: the mapped network drive?

    Yes, for sure.

    If I use the command prompt rather than the script, it actually works properly :s
      My Computer


  7. Posts : 4
    Win7+10, Home+Pro, 32+64
       #256

    pplucky said:
    Golden said:
    In Windows Explorer, is Y: the mapped network drive?

    Yes, for sure.

    If I use the command prompt rather than the script, it actually works properly :s
    Is the script running as Administrator?

    For some reason, Robocopy behaves better when ran as user instead of Administrator. "Error 3" plagued me for some time before I realized.
      My Computer


  8. Posts : 1
    WA
       #257

    I also supply /XJ (to prevent following junctions) and /B to acquire backup restore privilege. The latter ensures you will not run into ACL issues but you need to run the script elevated. Also I never use /MIR - because /MIR will delete files that have been deleted on the source drive. With MIR you can potentially lose data when say some files are missing in the source drive.
      My Computer


  9. Posts : 3
    Windows 10 Pro x64
       #258

    Fixed by NOT running the script as Administrator (as I used to do in Windows 7 without issues) and also change /ZB to /Z as the backup mode.

    Now all works well and is back to normal.
      My Computer


  10. Posts : 3
    Windows 7 64bit
       #259

    I have been using robocopy with success mirror copying folders from different locations and drives. However, I am having difficulty backing up a drive from an old Trition 250 unit nas.

    Robocopy always add 3 backslashes.

    Here is my input
    'robocopy \\jcbnas\disk1 C:\disk1'

    Robocopy trys to scan the nas with '\\jcbnas\disk1\\\' which is an invalid path.

    I have tried different ways of add the line source path with quotes, with and without backslash. Changed the network name. Created a network drive with a letter and tried to connect with it. Using the network ip address rather its name. It always add 3 backslashes during scan.

    I am able to copy using unc path from a hdd that is connected from a pc with no issue. It is just this NAS I have trouble with.
      My Computer


 
Page 26 of 32 FirstFirst ... 162425262728 ... LastLast

  Related Discussions
Our Sites
Site Links
About 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 23:35.
Find Us