Camen Design Forum

Delete

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

To delete this post you must be either the original author or a designated moderator.
The content of the post will be removed but the name and date will remain.

  • The post will be removed completely from the thread, rather than blanked
  • Only posts on the last page of the thread can be removed completely (so as to not break permalinks)

RE[6]: Backup on Windows utterly sucks and has for decades; can you help?

Kroc

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
@ECHO OFF
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>
	NET USE T: \\192.168.1.100\Backup /PERSISTENT:NO
	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
	NET USE T: /DELETE
)
%

[1] http://vscsc.sourceforge.net/
[2] http://sourceforge.net/projects/vscsc/files/utilities/dosdev.zip/download

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn