I back a lot of data up using WinRAR and I create a .rar file from these backups. Since I back up about 20GB of data at a time this process takes some time. Sometimes I need to open a few of the files that I am backing up. This causes WinRAR to report that there was a problem with accessing the file. My question is, how could I carry out the zipping using Volume Shadow Copy so that the files get accessed without any problems?
You should use the Diskshadow command to create a shadow copy to temporarily mount it as a volume. Once you do that you can use any tool such as winrar to make the backup.
The shadow copy behaves like a virtual disk that represents the state of the volume at the time it was created. If you continue to modify files, these modifications will not appear in the shadow copy, but the disk space taken by these files will double since their old copies will be kept on the disk until the shadow copy is deleted.
Here is an example based on the above Microsoft documentation that I linked to, where we backup disk C: and the shadow copy is called S: (which is identical to C: except frozen in time). The example is entirely theoretic, as I have not tested it.
diskshadow -s startshadow_script.txt <winrar of files in S:> diskshadow -s endshadow_script.txt
set context persistent nowriters set verbose on add volume C: alias MyBackupName create expose %MyBackupName% S:
set verbose on delete shadows exposed S: