Results 1 to 12 of 12
  1. #1
    WS Lounge VIP access-mdb's Avatar
    Join Date
    Dec 2009
    Location
    Oxfordshire, UK
    Posts
    2,019
    Thanks
    164
    Thanked 192 Times in 185 Posts

    Question abut Robocopy and its log

    I use Robocopy to copy files from a to b (well C: to other disks). This is what I use:

    Code:
    robocopy E:\Documents\ "\\GOFLEX_HOME\GoFlex Home Backup\Robocopy_Def\documents" /V /TEE /MIR /NP /XJD /R:3 /W:1 /log+:E:\Documents\logs\DocumentsGyymmdd.txt /XD E:\Documents\exe
    What I'm getting confused about is that it seems to copy all my files, even when they haven't changed. I can't find any explanation online about the log output e.g. what does 'newer' or 'modified' etc mean? Have I got an option (or two) wrong?
    My intention is to copy changed files, and delete files from the backup which have been deleted from the source.
    Eliminate spare time: get on the Internet!

  2. #2
    Super Moderator bbearren's Avatar
    Join Date
    Dec 2009
    Location
    Polk County, Florida
    Posts
    3,899
    Thanks
    27
    Thanked 446 Times in 353 Posts
    I use these switches:

    V:\Users\bbearren\Documents A:\OneDrive\Documents /MIR /XJD /R:1 /W:1 /MT:64 /V /NP /LOG:V:\Users\bbearren\Desktop\DocumentsCopy.log

    After the last run, these were the last entries in the log:


    This runs nightly via Task Scheduler.
    Last edited by bbearren; 2017-05-15 at 19:13.
    Create a fresh drive image before making system changes, in case you need to start over!

    "The problem is not the problem. The problem is your attitude about the problem. Savvy?"—Captain Jack Sparrow "When you're troubleshooting, start with the simple and proceed to the complex."—M.O. Johns "Experience is what you get when you're looking for something else."—Sir Thomas Robert Deware.
    Unleash Windows

  3. #3
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    3,533
    Thanks
    36
    Thanked 208 Times in 187 Posts
    There's some quite old Robocopy documentation here: http://www-pc.uni-regensburg.de/syst...s/robocopy.doc.
    I would be looking at the /Xn commands (page 9). Information about the Output Log starts at page 28. "Tags for files" is on page 30.

    I tend to use the following structure
    Code:
    set source=E:\Documents\
    set target="\\GOFLEX_HOME\GoFlex Home Backup\Robocopy_Def\documents"
    set parms=/V /TEE /MIR /NP /XJD /R:3 /W:1 /XD E:\Documents\exe
    set log=E:\Documents\logs\DocumentsGyymmdd.txt
    
    robocopy %source% %target% %parms% /log+:%log%
    which makes the BATch file easier to read.

    You should be getting the results you want using /MIR, which makes the backup copy the same as the original (except for the /XD)...
    Last edited by BATcher; 2017-05-16 at 03:20.
    BATcher

    milliHelen
    (unit): that quantity of female facial beauty sufficient to launch a single ship

  4. #4
    WS Lounge VIP access-mdb's Avatar
    Join Date
    Dec 2009
    Location
    Oxfordshire, UK
    Posts
    2,019
    Thanks
    164
    Thanked 192 Times in 185 Posts
    BATcher, I have /MIR already!

    This is the summary I have.

    Total Copied Skipped Mismatch FAILED Extras
    Dirs : 469 1 468 0 0 1
    Files : 3111 1318 1793 0 0 8
    Bytes : 1.739 g 1.636 g 105.35 m 0 0 232.3 k
    Times : 0:09:11 0:08:39 0:00:00 0:00:32


    Speed : 3382811 Bytes/sec.
    Speed : 193.566 MegaBytes/min.
    Ended : 16 May 2017 09:45:57

    And I haven't changed 1318 files. There are many which are marked as Newer which they aren't, which is what is confusing me.

    I will have to do some more checking when I get back....

    Oh, and thanks for the link BATcher - seems strange that I can't find an explanation for those that are more up to date (modified is an entry in my logs which isn't in the Word doc.)
    Eliminate spare time: get on the Internet!

  5. #5
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    3,533
    Thanks
    36
    Thanked 208 Times in 187 Posts
    Perhaps I should have italicised should in
    "You should be getting the results you want using /MIR"!

    I think Microsoft gave up on documenting Robocopy after XP, and consider that ROBOCOPY /?
    gives everything anyone would need...
    BATcher

    milliHelen
    (unit): that quantity of female facial beauty sufficient to launch a single ship

  6. #6
    Super Moderator bbearren's Avatar
    Join Date
    Dec 2009
    Location
    Polk County, Florida
    Posts
    3,899
    Thanks
    27
    Thanked 446 Times in 353 Posts
    Attached is the output of "RoboCopy /?" RoboCopySwitches.txt

    TechNet page on RoboCopy.

    Your RoboCopy commandline:

    /V /TEE /MIR /NP /XJD /R:3 /W:1 /log+:E:\Documents\logs\DocumentsGyymmdd.txt /XD E:\Documents\exe

    "/V" - produce Verbose output, showing skipped files.
    "/TEE" - output to console window, as well as the log file.
    "/MIR" - MIRror a directory tree (equivalent to /E plus /PURGE).
    "/NP" - No Progress - don't display percentage copied.
    "/XJD" - eXclude Junction points for Directories.
    "/R:3" - number of Retries on failed copies: default 1 million.
    "/W:1" - Wait time between retries: default is 30 seconds.
    "/log+"- output status to LOG file (append to existing log).
    "/XD" - eXclude Directories matching given names/paths.

    Do you have a "E:\Documents\exe" directory? Also, at the beginning of your log file there should be a list of Options used by RoboCopy in executing your commandline; RoboCopy assumes some switches that are not specified in the commandline.

    My commandline is "/MIR /XJD /R:1 /W:1 /MT:64 /V /NP /LOG".

    RoboCopy runs using "*.* /V /S /E /DCOPY:DA /COPY:DAT /PURGE /MIR /NP /XJD /MT:64 /R:1 /W:1".

    Which assumed switches is RoboCopy using in running your commandline?
    Last edited by bbearren; 2017-05-16 at 09:49.
    Create a fresh drive image before making system changes, in case you need to start over!

    "The problem is not the problem. The problem is your attitude about the problem. Savvy?"—Captain Jack Sparrow "When you're troubleshooting, start with the simple and proceed to the complex."—M.O. Johns "Experience is what you get when you're looking for something else."—Sir Thomas Robert Deware.
    Unleash Windows

  7. #7
    5 Star Lounger
    Join Date
    Jan 2010
    Location
    Fort McMurray, Alberta, Canada
    Posts
    717
    Thanks
    73
    Thanked 92 Times in 87 Posts
    My understanding is that Robocopy uses file timestamps. Thus it is trusting that those timestamps are reasonably accurate.

    When Robocopy refers to a "newer" copy, that means that file has a more recent timestamp at the destination than at the source. Same goes for "modified".

    Robocopy does not inspect the file contents to make these determinations. Nor does it look at file sizes; this implicitly means that even if a file suddenly shrinks dramatically, Robocopy will pay no notice to that. The design assumption is that if a file shrinks but has a later timestamp, then the author of that file intended to shrink the file.

    In this way Robocopy is relatively simple and contains no "red flag" logic. You cannot expect Robocopy to perform multi-variate comparisons even with all the options and features Robocopy has available.

  8. #8
    WS Lounge VIP access-mdb's Avatar
    Join Date
    Dec 2009
    Location
    Oxfordshire, UK
    Posts
    2,019
    Thanks
    164
    Thanked 192 Times in 185 Posts
    Thanks to BATcher who actually answered my question; this was what do the various flags mean in the log. The problem was only happening when copying to my NAS; Googling for the problem had suggested using /FFT. This was the answer, and now it doesn't copy files which haven't changed. It would appear that the NAS isn't NTFS so the times of each file were slightly different. /FFT increases time granularity by two minutes. Looking through the logs, the problem doesn't happen when copying to known NTFS disks.
    Eliminate spare time: get on the Internet!

  9. #9
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    3,533
    Thanks
    36
    Thanked 208 Times in 187 Posts
    Aha! This triggered a memory of some NAS work I did in 2009...

    You may find (just) the first few pages of the attached document to be of interest..
    Attached Files Attached Files
    BATcher

    milliHelen
    (unit): that quantity of female facial beauty sufficient to launch a single ship

  10. #10
    WS Lounge VIP access-mdb's Avatar
    Join Date
    Dec 2009
    Location
    Oxfordshire, UK
    Posts
    2,019
    Thanks
    164
    Thanked 192 Times in 185 Posts
    Thanks BATcher - that's consistent with what I've found. The suggestion to use /FFT was for copying to FAT disks, but obviously copying to anything not NTFS I likely to need the switch. As I said, I thought it was all my copies but it was only the one to my NAS disk.

    Still haven't found an up to date explanation of the log output!
    Eliminate spare time: get on the Internet!

  11. #11
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    3,533
    Thanks
    36
    Thanked 208 Times in 187 Posts
    Now you've worked out how to copy the 'updated and new' files to the NAS box and delete those on the NAS box which no longer appear on the source disk, can you perhaps restate what you are objecting to in the LOG output?
    A copy of the log might assist, provided it's not confidential and fairly short...

    Of course the real meaning of FFT is Fast Fourier Transform, as you well know!
    BATcher

    milliHelen
    (unit): that quantity of female facial beauty sufficient to launch a single ship

  12. #12
    WS Lounge VIP access-mdb's Avatar
    Join Date
    Dec 2009
    Location
    Oxfordshire, UK
    Posts
    2,019
    Thanks
    164
    Thanked 192 Times in 185 Posts
    I wasn't objecting to anything I just wanted to know what they mean. And the link you gave me helps enormously and I think that I can work out the rest. I just didn't want so much unnecessary copying going on. I haven't time now but I'll post something later.

    Ahh Fast Fourier transforms. I think I did those in the late 70s in my HNC Maths Stats and Computing. I don't think I could do them now. How about two-way Anova with replication?
    Eliminate spare time: get on the Internet!

Posting Permissions

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