19
2
I am trying to copy a large database backup file over network.
The traditional program copy or xcopy
failed with different binary resulted. Also tried robocopy
without parameter, and resulted a failure. Just did another attempt with robocopy
using /zb
parameter (restart and backup mode). It took much longer but resulted in a success.
My question is, is backup mode really designed to copy large / backup file? Have searched through net and couldn't find a clear answer. Would appreciate if any experienced user could give me a hint or better solution.
There is very little difference between how xcopy and robocopy actually copy data over from A to B, so using robocopy over xcopy won't reduce your chances of accidental data corruption. Meaning that you got a different binary after using xcopy most likely because the DB was modified while it was copied. The "/Z" flag is of no relevance here (it just controls if robocopy skips over existing part of the file), as is the "/B" flag that basically controls permissions requested by the app when opening source file. – Angstrom – 2015-09-23T13:30:07.343
@Angstrom thanks for your reply. The binary difference is not from a changing DB as it's a static backup file (already detached from the database) being copied. True I believe /ZB does nothing intentionally for more robust copy, but the restartable flag seems make a more accurate binary write (from the fact that it takes much longer and result in an identical copy). Or it could be the restartability make it possible to rewrite lost data. – ydoow – 2015-09-23T23:19:41.003