That elusive magic ROBOCOPY spell for backing up a drive

I have used ROBOCOPY to ROBustly COPY data from one disk to another, and have on at least a couple of occasions, messed it up so badly that seriously important files have been damaged.

I am now confident that I have found the right spell to create an incremental backup on a backup drive, only copying newer files over.

The spell is:

robocopy <source> <destination> /R:0 /E /W:5 /XO

Where

<source> is the original data to be backed up  ie X:\ or X:\CHURCH

<destination> is the place to copy it to ie Y:\ or Y:\CHURCH

/R:0 sets the number of retries to zero (you shouldn’t have any file open if it is going to be backed up)

/W:5 is the time to wait

/E copies all the subdirectories of <source> but not if they are empty

/XO eXcludes Older files, so only new or newer files are copied.

I put this into a batchfile and run BIGBACKUP.BAT which enacts this whenever I need it.