Updated How to enable VSS for rclone (2) (markdown)

albertony 2020-05-07 23:46:12 +02:00
parent 5470fbb817
commit 2aa729e5d0

@ -62,6 +62,7 @@ Clarifications:
- The shadow copy (snapshot) is read-only, due to the command line argument `-nw` ("no writers") specified to `vshadow.exe`. - The shadow copy (snapshot) is read-only, due to the command line argument `-nw` ("no writers") specified to `vshadow.exe`.
- The path `c:\snapshot\` is a temporary symbolic link only accessible while exec.cmd is running, you will see it in Windows Explorer until the sync is completed (but it is read-only). - The path `c:\snapshot\` is a temporary symbolic link only accessible while exec.cmd is running, you will see it in Windows Explorer until the sync is completed (but it is read-only).
- The contents of `c:\snapshot\` that rclone sees, is a mirror image of `c:\`, meaning there will be a directory `c:\snapshot\Program Files` mirroring `c:\Program Files` etc. If this is confusing, read about improvements below. - The contents of `c:\snapshot\` that rclone sees, is a mirror image of `c:\`, meaning there will be a directory `c:\snapshot\Program Files` mirroring `c:\Program Files` etc. If this is confusing, read about improvements below.
- Upon successful return vshadow will print message "Snapshot creation done.". This just means everything went well: It created the snapshot AND executed our script AND the snapshot was automatically deleted. Upon failure it will print message "Aborting the backup..." but this does not mean anything, because there is no backup to abort (in read-only/no writers mode) so it is not skipping anything that it would else do on a successful run (see [source1](https://github.com/microsoft/Windows-classic-samples/blob/master/Samples/VShadowVolumeShadowCopy/cpp/util.h#L692-L697), [source2](https://github.com/microsoft/Windows-classic-samples/blob/master/Samples/VShadowVolumeShadowCopy/cpp/shadow.cpp#L881-L910) and [source3](https://github.com/microsoft/Windows-classic-samples/blob/master/Samples/VShadowVolumeShadowCopy/cpp/create.cpp#L154-L157) for proof).
Error handling and robustness Error handling and robustness
- Wherever the batch scripts are referenced, we prefix their names with `%~dp0` to make absolute paths assuming they are in the same directory as the script they are referenced from, and surrounding with double quotes in case there are spaces in the path. This will prevent any surprises when running from different working directories, e.g. "Run as administrator" is notorious for always setting working directory to `C:\Windows\System32`. - Wherever the batch scripts are referenced, we prefix their names with `%~dp0` to make absolute paths assuming they are in the same directory as the script they are referenced from, and surrounding with double quotes in case there are spaces in the path. This will prevent any surprises when running from different working directories, e.g. "Run as administrator" is notorious for always setting working directory to `C:\Windows\System32`.