We've been putting the finishing touches to our new remote data backup solution (we've decided on synching files over an openSSL link), and boy have we run into a lot of headaches!
Backing up open files... VSS + Robocopy
Robocopy is very good, though it can't deal with locked files very well. So we thought we'd try using
Hobocopy, but this also has a few problems. Without any other way of doing VolumeShadowCopies, we thought we'd have to go back to using NTbackup, but there was a solution to be found...
Using this as a guide (you will also need to
download this SDK), we now have volume shadows exposed as a drive letter, which we can then Robocopy from!
Tip: use the GeneratedVarsTempScript.cmd so that you can call VSHADOW.EXE -ds=%SHADOW_ID_1% from your own batch file, and remove the -nw switch from the vshadow argument list so you get the MSDE writers (exchange/mssql)
Scripting openVPN:
Scripting all of this via a batch file is a little complex - we also can't use "net start openvpnservice" to start/stop openVPN because we already have openvpn running on the machine! We also can't just run the openvpn.exe file because it doesn't return control back to the batch file. We ended up renaming the openvpn.exe file to "backup_openvpn.exe", and started it with "start backup_openvpn.exe path/to/our_config_file.ovpn", and at the end of our backup script doing:
FOR /F "tokens=2 delims=[tab][space]" %%A IN ('TASKLIST /V ^| FIND /I "backup_openvpn.exe"') DO taskkill /PID %%A /T
- replace [tab] and [space] with the appropriate keypresses!
Freeware Ghost Replacement
In other news, ruairi has found
FreeGhost, which looks to be a promising project for us windows sysadmins.