Archive for August 6, 2017

Robocopy

Posted in windows with tags on August 6, 2017 by marksun

August 2017-
While I use it, Robocopy can produce unexepected behavior, and worse, not backup files. I’ll accept the fault as my own for not completely reading or understanding everything available on robocopy. As I discover problems, I’ll try to update here.  I’d be pretty happy with tar or cpio, but it is what it is.

This is pretty good:
https://community.spiceworks.com/topic/358653-robocopy-incremental-copy-mir-or-xo-what-s-your-choice

robocopy %home%\Pictures %mybk%\Pictures  /XO /FFT
This command does not backup new files and directories on my %home% directory!  I fully expected it to copy new files and folders but IT DOES NOT.  No idea why.

To make it copy all files I added /MIR and got rid of /XO
robocopy %home%\Pictures %mybk%\Pictures /MIR  /FFT

/XO  I had this there to prevent robocopy from copying files that already exist but this may in fact prevent it from copying files that DONT exist on the destination!  removing it.

/FFT is absolutely necessary to make timestamp comparisons work between Windows7 and the LINUX OS on the backup drive – a WD MyBook.  The backup will fail silently without /FFT.

/MIR is supposed to mirror the file dirs of source and destination.  if a file is deleted on the source, it should delete on the destination!

Below are current (aug2017) settings   – in this case for a single \Pictures  directory

set home=”C:\users\xxxxxxx”
set mybk=”Y:\xxxxxxxprofile”

echo Picture Backup Start
pause
robocopy %home%\Pictures %mybk%\Pictures /MIR /FFT

Advertisements