No announcement yet.

Robocopy on SBS2003

  • Filter
  • Time
  • Show
Clear All
new posts

  • Robocopy on SBS2003

    I would like to robocopy a clients data on a Thursday night, and then on
    Friday only copy the files that have been changed. Has anyone done this
    before? What are the switches?

  • #2
    Re: Robocopy on SBS2003

    You can create a batch files Thursday.cmd and Friday.cmd and setup task so the batch file will run at given time

    I am using something like this every Friday ... I am sure someene here can fix it for you the switches

    @echo off

    : RoboCopy path (including the EXE)
    SET RoboCopy=E:\admutil\Robocopy.exe

    : RoboCopy Source

    : RoboCopy destination
    SET To= "E:\CLIENT\%DATE%"

    : Transfer ::

    %RoboCopy% %From% %To% /S /E /X /V /ETA /W:0 /R:0

    REM /S - copy subfolders
    REM /E - copy subfolders and empty ones
    REM /IPG:n - to free packets on slow lines
    REM /X - report all extra files, not just those selected
    REM /V - produce verbose output log, showing skipped files
    REM /ETA - show estimated time of arrival of coppied files


    ECHO %DATE% %TIME% COPIED to SERVER >> E:\admutils\RoboLog.log


    • #3
      Re: Robocopy on SBS2003

      Here's what I use in a batch file. The same batch file runs every night. the very first time it runs it creates the directory structure on the destination server and copies all the files and then every subsequent time it runs it "synchronizes" the files. If a file is created on the source then it gets created on the destination. If a file is deleted on the source then it gets deleted on the destination. I run this batch file as a scheduled job on the source server. It also creates a log of it's activity.

      robocopy "D:\FolderToMirror" "\\destinationserver\FolderToMirror" /MIR /COPYALL /V /NFL /LOG:"D:\robocopylog.txt" /R:5 /W:3
      Last edited by joeqwerty; 23rd May 2008, 04:32.


      • #4
        Re: Robocopy on SBS2003

        What is the switch that makes the "sync" after the 1st time it is ran? Your script looks like it copies it twice.


        • #5
          Re: Robocopy on SBS2003

          The /MIR (mirror) switch is what does it. After the files are copied the first time it will only copy files that are created or changed. It will also delete files on the destination that are deleted on the source. This essentially "synchronizes" the source and destination.


          • #6
            Re: Robocopy on SBS2003

            does /mir do anything with permissions?


            • #7
              Re: Robocopy on SBS2003

              No, it only mirrors the files. For permissions you want the /DATSOU or /COPYALL options to be set.


              • #8
                Re: Robocopy on SBS2003

                All the info can be found in the manual.
                Why didn't you start reading that first?
                Technical Consultant

                MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
                "No matter how secure, there is always the human factor."

                "Enjoy life today, tomorrow may never come."
                "If you're going through hell, keep going. ~Winston Churchill"