Dienstag, 28. Juni 2011

Using Shadow Copy to back up folders in Windows 7

It is always a good idea to keep backups of your stuff. Unfortunately, some folders like %APPDATA% can not be copied while Windows has locked files inside. That's where the Volume Shadow Copy Service (VSS) comes into play. It basically creates a consistent snapshot of the data and allows to access it regardless of file locks. I wrote a small batch script for Windows 7 that does the following:

  1. Create snapshot of folder
  2. Mirror the folder to another place
  3. Destroy snapshot

The script relies on three tools, only one of which ships with the vanilla Windows 7 installation. These are the dependencies:

You can download the batch file below. It creates a backup of your own user's %APPDATA% folder (C:\Users\USERNAME\AppData\Roaming) to the target folder D:\Backup\AppData. The script needs to run as Administrator in order to create snapshots.

Download: backup_appdata.cmd

Kommentare:

  1. Though idea is good it doesn't really work

    AntwortenLöschen
  2. Seems good but didn't work out for me. One of the reason was I was unable to understand this command line, and other is its buggy and sometimes some of my files went missing because of it. I was looking for a GUI alternative to it which could work better than it. My search stopped when I found GS Richcopy 360. It has made my life easier, its multi threaded file transfer ability can handle way more threads than robocopy. I would recommend to try it, although its paid but its worth the price. After all, time is money. ;)

    AntwortenLöschen