+ Post New Thread
Results 1 to 13 of 13
Scripts Thread, Robocopy syntax in Coding and Web Development; Hi Guys im new to this forum so a quick hello Basically im looking for a quick command line for ...
  1. #1

    Join Date
    Sep 2010
    Location
    UK
    Posts
    5
    Thank Post
    6
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Robocopy syntax

    Hi Guys im new to this forum so a quick hello

    Basically im looking for a quick command line for robocopy to copy files from NAS storage (source) to a western general nas box (destination) for a quick backup. The destination already has folders on it that i started copying using xcopy this had taken 5 days then failed so i don't want to have to recopy these and start again. So basically i want to copy all folders in the source directory including all subfolders to the destination directory but only to copy folders that are not already there. I had tired richcopy but this was taken far to long and xcopy seemed to be much faster although didn't have the same fault tolerance. There is a lot of data to be copied as quickly as possible , about 1.6TB so restart/recovery is a must.

    Thanks.

  2. #2
    TheLibrarian
    Guest

  3. #3

    Join Date
    Sep 2010
    Location
    UK
    Posts
    5
    Thank Post
    6
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hi TheLibrarian

    Thanks for the prompt reply , I had tired the GUI before and basically when i put in source , destination and correct parameters and hit copy nothing happend , I had tried this several times hence the reason i would like to try it from the command line cheers.

  4. #4

    sparkeh's Avatar
    Join Date
    May 2007
    Posts
    6,739
    Thank Post
    1,272
    Thanked 1,645 Times in 1,101 Posts
    Blog Entries
    22
    Rep Power
    505
    Commandline syntax is here

  5. Thanks to sparkeh from:

    azrael78 (11th October 2010)

  6. #5

    SpuffMonkey's Avatar
    Join Date
    Jul 2005
    Posts
    2,230
    Thank Post
    54
    Thanked 278 Times in 186 Posts
    Rep Power
    134
    Try richcopy instead!

  7. Thanks to SpuffMonkey from:

    jamster69 (1st October 2010)

  8. #6

    sparkeh's Avatar
    Join Date
    May 2007
    Posts
    6,739
    Thank Post
    1,272
    Thanked 1,645 Times in 1,101 Posts
    Blog Entries
    22
    Rep Power
    505
    Quote Originally Posted by jamster69 View Post
    ...I had tired richcopy...
    Thanks.
    Quote Originally Posted by SpuffMonkey View Post
    Try richcopy instead!
    I think he has

  9. Thanks to sparkeh from:

    jamster69 (1st October 2010)

  10. #7

    Join Date
    Sep 2010
    Location
    UK
    Posts
    5
    Thank Post
    6
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hi Guys thanks for all your replys , Im actually looking for someone to show me how they would write the xcopy command line with the correct syntax and parameters . Thats will be 100 correct and tested. I just want to copy and paste it in to the cmd.exe and run it . Cheers.
    ROBOCOPY \\Server1\nas1 \\Server2\backup /S /E /Z ....would this work ? copy everthing in source that is not in destination including all sub folders and files. Cheers.

  11. #8

    Join Date
    Sep 2010
    Location
    UK
    Posts
    5
    Thank Post
    6
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Just wondering , if I restart xcopy after there was a network outage to the destination will it start from where it let off ??

  12. #9
    TheLibrarian
    Guest
    AFAIK xcopy does not have this facility, however I think robocopy does.

    I haven't looked to see if xcopy has been updated in a goodly number of years, so this could be wildly inaccurate.
    Last edited by TheLibrarian; 1st October 2010 at 02:18 PM. Reason: Disclaimer

  13. Thanks to TheLibrarian from:

    jamster69 (1st October 2010)

  14. #10

    Join Date
    Sep 2010
    Location
    UK
    Posts
    5
    Thank Post
    6
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Thans Librarian , I thouhgt so. Will this work ? ROBOCOPY \\Server1\nas1 \\Server2\backup /S /E /Z so will only copy directorys and files not already at the destination ? Cheers.

  15. #11
    TheLibrarian
    Guest
    That looks OK, but you might want to look at these switches too...

    Code:
    ::
    :: Retry Options :
    ::
                   /R:n :: number of Retries on failed copies: default 1 million.
                   /W:n :: Wait time between retries: default is 30 seconds.
    One locked file and your job is not going to finish on time.

  16. Thanks to TheLibrarian from:

    jamster69 (6th October 2010)

  17. #12

    sparkeh's Avatar
    Join Date
    May 2007
    Posts
    6,739
    Thank Post
    1,272
    Thanked 1,645 Times in 1,101 Posts
    Blog Entries
    22
    Rep Power
    505
    Quote Originally Posted by jamster69 View Post
    Thans Librarian , I thouhgt so. Will this work ? ROBOCOPY \\Server1\nas1 \\Server2\backup /S /E /Z so will only copy directorys and files not already at the destination ? Cheers.
    Yes that would appear to what you want.

    Edit: though those switches above would be handy

  18. Thanks to sparkeh from:

    jamster69 (6th October 2010)

  19. #13

    3s-gtech's Avatar
    Join Date
    Mar 2009
    Location
    Wales
    Posts
    2,715
    Thank Post
    144
    Thanked 549 Times in 493 Posts
    Rep Power
    149
    We use:

    robocopy \\server\share \\backup\share\ /MIR /R:00 /W:00 /XD *AppData* /COPY:dT

    I use the /XD *AppData tag to prevent copying of the AppData folder, as this brought the backup times up to 18 hours or so due to its mass of small files. /MIR removes deleted files, /R:00 is number of retries, /W:00 is wait time between retries. /COPY:dT sets robocopy to copy Data and Timestamps, can't use DAT as our Linux NAS won't copy NTFS flags.

    This has worked pretty well for us, completes in decent time too (150GB data).

  20. Thanks to 3s-gtech from:

    jamster69 (6th October 2010)

SHARE:
+ Post New Thread

Similar Threads

  1. SYntax error
    By Lipjam in forum Scripts
    Replies: 3
    Last Post: 15th September 2010, 11:15 AM
  2. xcopy syntax
    By leco in forum How do you do....it?
    Replies: 2
    Last Post: 28th August 2010, 10:37 AM
  3. [Fog] Syntax for specifying OU in AD
    By birchanger in forum O/S Deployment
    Replies: 3
    Last Post: 24th July 2009, 04:02 PM
  4. SQL Syntax?
    By ScottStevinson in forum How do you do....it?
    Replies: 2
    Last Post: 8th September 2008, 01:01 PM
  5. Grep syntax for multiple srtings?
    By ChrisH in forum *nix
    Replies: 17
    Last Post: 14th October 2006, 08:20 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •