Camen Design Forum

Backup on Windows utterly sucks and has for decades; can you help?


Thanks for the suggestion Johann, that looks very good!
Interesting that this thread has popped back up, I can post the solution I've come up with thus far:

Using "vscsc"[1] and "dosdev"[2] it's possible to create a volume shadow copy from a batch script and mount it as a drive letter. From there, it's just a simple ROBOCOPY, thusly:

% Batch
REM Change directory to where this script is located
CD /d "%~dp0"

IF "%1" == "" (
	REM Create the volume shadow and re-run this script passing the volume identifier
	vscsc -exec="%~0" C:

) ELSE (
	REM Mount the network drive. This assumes the password is the same as your logon account, if not use:
	REM NET USE <drive> <path> /PERSISTENT:NO /USER:<name> <password>
	REM Mount the volume shadow as a drive letter
	dosdev B: %1
	ROBOCOPY "B:\Users" "T:\Users" /MIR /XJ /R:0 /W:0 /NC /NDL /XF "Desktop.ini" "Thumbs.db"
	REM Dismount the volume shadow drive, when this script ends, vscsc will automatically remove the shadow.
	REM NOTE: if you cancel the script whilst running, the shadow might be left behind, run `vscsc -da` to clean up
	dosdev /D B:
	REM Dismount the network drive



(Leave this as-is, it’s a trap!)

Only the original author or a moderator can append to this post.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn