ROBOCOPY - Create Backup Script

Page 4 of 32 FirstFirst ... 2345614 ... LastLast

  1. Posts : 2,177
    Windows 8.1 Pro x64
       #30

    can you provide an example of the file paths with a description of what needs backing up and what doesnt?

    e.g.
    Code:
    c:\projects\seven_forums\posts
    c:\projects\seven_forums\threads
    c:\projects\seven_forums\data
    c:\projects\seven_forums\admin
    c:\projects\seven_forums\stuff
    i would want folders posts, threads and data backed up.

    something along those lines so i can understand your requirements a little better.

    Cheers
      My Computer


  2. Posts : 5
    Windows 7 Pro
       #31

    Folder structure


    Below is a typical folder structure:
    (we have 100's of these with the difference being in the bldg# and Proj#)

    R:
    --Bldg# or ProjectType
    ----Project#1
    ------500_CAD
    --------3D
    --------A
    --------C
    --------D
    --------E
    --------G
    --------M
    --------S
    --------Archive
    --------xArchive
    --------xImage
    --------xInbox
    --------xIssue
    --------xOutbox
    --------xPlot
    --------xSupport
    (i.e., R:\234A\60101003\500_CAD\xInbox)

    The folders to be excluded are Archive, xArchive, xInbox, xSupport, xTemp

    Thanks, Ron
      My Computer


  3. Posts : 2,177
    Windows 8.1 Pro x64
       #32

    rschaef07 said:
    Below is a typical folder structure:
    (we have 100's of these with the difference being in the bldg# and Proj#)

    R:
    --Bldg# or ProjectType
    ----Project#1
    ------500_CAD
    --------3D
    --------A
    --------C
    --------D
    --------E
    --------G
    --------M
    --------S
    --------Archive
    --------xArchive
    --------xImage
    --------xInbox
    --------xIssue
    --------xOutbox
    --------xPlot
    --------xSupport
    (i.e., R:\234A\60101003\500_CAD\xInbox)

    The folders to be excluded are Archive, xArchive, xInbox, xSupport, xTemp

    Thanks, Ron
    Try the following:
    Code:
    robocopy <source> <destination> /e /xd Archive xArchive xInbox xSupport xTemp
    /e = include all directories including subdirectories
    /xd - exclude directories <dir1> <dir2> <dir3> (this would exclude any folder with the stated names)

    the other option would be to use a wildcard, for example, if you wanted to exclude all folders starting with an x then the following would also work:
    Code:
    robocopy <source> <destination> /e /xd x*
    Hope this helps?

    Regards,
    JDobbsy1987
      My Computer


  4. Posts : 5
    Windows 7 Pro
       #33

    I am already using code as you showed, including the * in the excluded folder list.
    But, per an earlier post (my apologies as I thought I was still in my earlier thread), Golden replied "Robocopy treats the * as part of the name, and of course Windows does not allow a folder to contain a * in its name."

    But if my excluded folders list includes "Archive", will it exclude every folder that is named "Archive"?

    Thanks much, Ron
      My Computer


  5. Posts : 2,177
    Windows 8.1 Pro x64
       #34

    rschaef07 said:
    an earlier post (my apologies as I thought I was still in my earlier thread), Golden replied "Robocopy treats the * as part of the name, and of course Windows does not allow a folder to contain a * in its name."
    I have just tested the following script and it worked fine:
    Code:
    robocopy <source> <destination> /e /xd x*
    It copied all folders but not any folders starting with an X

    But if my excluded folders list includes "Archive", will it exclude every folder that is named "Archive"?
    Correct... unless you explicitly specified the file path/folder e.g.
    Code:
    robocopy <source> <destination> /e /xd "R:\234A\60101003\500_CAD\xInbox"
    Do you have a lot of folders with the same name where some you would want to back up and others you wouldn't?
      My Computer


  6. Posts : 1,797
    Win 7 Ultimate, Win 8.1 Pro, Linux Mint 19 Cinnamon (All 64-Bit)
       #35

    Hello all,

    I would like to copy all the files from my T:\Data Backup drive to my D:\Data drive (I'm going to be wiping everything off D: and restoring all the files from my T: drive).

    ROBOCOPY - Create Backup Script-capture-04.png

    ROBOCOPY - Create Backup Script-capture-05.png

    I'm wanting to copy everything, all subfolders, files, dates, times, attributes and security permissions. And using 12 threads as I am copying about 540gb of data.

    Would this command do the job?

    Code:
    robocopy T:\ D:\ /COPY:DATSOU /MT:12 /e /np /log+:backup_log.txt
    Any help would be appreciated. :)
      My Computer


  7. Posts : 2,177
    Windows 8.1 Pro x64
       #36

    Burdus32 said:
    Hello all,

    I would like to copy all the files from my T:\Data Backup drive to my D:\Data drive (I'm going to be wiping everything off D: and restoring all the files from my T: drive).

    ROBOCOPY - Create Backup Script-capture-04.png

    ROBOCOPY - Create Backup Script-capture-05.png

    I'm wanting to copy everything, all subfolders, files, dates, times, attributes and security permissions. And using 12 threads as I am copying about 540gb of data.

    Would this command do the job?

    Code:
    robocopy T:\ D:\ /COPY:DATSOU /MT:12 /e /np /log+:backup_log.txt
    Any help would be appreciated. :)
    I don't see why that wouldn't work but me personally would remove the /np so i can see the progress it is making plus i would put some retry option in just encase there was an issue accessing the destination drive during the copy:

    e.g.
    Code:
    /Z /R:10 /W:20
    this way the copy shouldn't fail but wait 20 seconds and try again (the retry enables it to carry on from where it stopped rather than starting it all over again.)

    Regards,
    JDobbsy1987
      My Computer


  8. Posts : 1,797
    Win 7 Ultimate, Win 8.1 Pro, Linux Mint 19 Cinnamon (All 64-Bit)
       #37

    Thanks JDobbsy,

    so would this command be ok?

    Code:
    robocopy <source> <destination> /E /Z /COPYALL /MT:12 /log+:backup_log.txt /R:10 /W:20
      My Computer


  9. Posts : 2,177
    Windows 8.1 Pro x64
       #38

    Burdus32 said:
    Thanks JDobbsy,

    so would this command be ok?

    Code:
    robocopy <source> <destination> /E /Z /COPYALL /MT:12 /log+:backup_log.txt /R:10 /W:20
    That looks like it will do a good job
    As a precautionary... I would always do a quick test on some MOC up folders/files

    Regards,
    JDobbsy1987
      My Computer


  10. Posts : 1,797
    Win 7 Ultimate, Win 8.1 Pro, Linux Mint 19 Cinnamon (All 64-Bit)
       #39

    Brilliant, thanks for the help JDobbsy!

    Just one quick question, is the
    /COPYALL
    command the same as
    /COPY: DATSOU
    I have an old backup drive that I use for testing, I'll try it out on that first. :)
      My Computer


 
Page 4 of 32 FirstFirst ... 2345614 ... 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 03:10.
Find Us