Saturday, January 29, 2011

Hobocopy comes back to life (Hobocopy is like a lite robocopy, but with Volume Shadow Service support, i.e. can copy files that are in use)

CraigBlog - Hobocopy Lives!

"It’s hard to believe it has already been almost over four years since I wrote a little tool called hobocopy. The name was a pun on the truly-awesome robocopy, which does a great many things and is a truly useful tool. Hobocopy doesn’t do a tenth what robocopy does, but it does do one thing that robocopy can’t: copy files that are currently in use. It does that by using the Volume Shadow Service, which is the same facility Windows uses to create Restore Points. You can read more about hobocopy here and here.


..Of course I have far more projects I want to tackle than I could do in a decade of Fridays, but still, I figured that hobocopy deserves some love. So I’ve been spending a bit of time on it lately. I've created the hobocopy Google group, and I've moved the code to its new home on GitHub. ..."

Github - hobocopy


HoboCopy is a backup/copy tool. It is inspired by robocopy in both name and in functionality. It differs greatly from robocopy, however, in two respects:

  1. It is not as full-featured as robocopy.
  2. It uses the Volume Shadow Service (VSS) to "snapshot" the disk before copying. It then copies from the snapshot rather than the "live" disk.


Most users can simply unzip the file containing hobocopy.exe into the directory of your choice. However, HoboCopy uses the Visual C++ 8.0 runtime, which may not be present on some machines. If HoboCopy does not work for you, run the vcredist executable available from the same location you downloaded HoboCopy.


Because HoboCopy copies from a VSS snapshot, it is able copy even files that are in locked by some other program. Further, certain programs (such as SQL Server 2005) are VSS-aware, and will write their state to disk in a consistent state before the snapshot is taken, allowing a sort of "live backup". Files locked by VSS-unaware programs will still be copied in a "crash consistent"state (i.e. whatever happens to be on the disk). This is generally a lot better than not being able to copy the file at all.


Well, not exactly. It can be used that way, but it doesn't do a few things that "real" backup tools to. For example, there's currently no support for differential copies. Also, it does not currently make use of the OS support for doing backups that would allow it to do things like copy even files it does not nominally have permission to copy.

The other caveat is that HoboCopy is a hobby project. Therefore, it is not recommended that anyone use it as a backup strategy for valuable information- no warranty is provided in the event that something goes wrong.

That said, the author of the tool uses it to back up his own systems.


Oh robocopy, don't worry, I still love you... But there's times when I'd like to copy files that are in use, which you can't do...

Also having the source, snapshot below, makes me smile (not that I'd really know to do with C++ code, but you never know... ;)

Source Tree Snap Shot


Anonymous said...

First I had to install "ShadowCopy" and "vcredist", and ran "net start vss", then "cmd" to get the command-line editor.

There I entered the directory containing Hobocopy:

C:> cd C:\Program Files\hobocopy

... then entered "hobocopy" with the source directory and the target directory in quotes:

C:\Program Files\hobocopy> hobocopy "C:\Documents and Settings\User\Local Settings\Temp" "C:\Documents and Settings\User\My Documents\duplicate"

... then enter, and wait for confirmation. It copied everything in "Temp" to "duplicate".

zippy1981 said...


I made a chocolatey pacckage for HoboCopy