Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a tool similar to Robocopy or TeraCopy that would do a "shadow copy" of a folder?

I'm not sure if this is technically possible on Windows 7 but what I'd like to find a utility that, when I execute the "copy" command, would create a fixed copy of that folder at that given time and then copy the result over to another location. What I'd like to achieve are consistent copies of folders that might be currently in use.

Is this possible on Windows? Is there any user friendly utility to help with this?

share|improve this question
    
What do you mean by a fixed copy? –  soandos Feb 26 '12 at 20:17
    
I'm not sure which term to use but the result should be the same as if the copy was done using VSS but only on the folder-level, not disk-level. The goal is to create a consistent copy of a folder - as if the backup ran in 0.0s. –  Borek Feb 26 '12 at 20:22
    
@soandos, VSS sends out a single to all application telling them to complete any writes so what is saved on the disk is consistent, then it temporarily re-directs all new writes to a different location and makes it possible for you to mount and access anything from the shadow in that consistent state. This allows you to backup a huge amount of data without stopping any services or applications. –  Zoredache Feb 26 '12 at 20:40

2 Answers 2

up vote 7 down vote accepted

What I'd like to achieve are consistent copies of folders that might be currently in use.

Please understand that applications must actually be compatible with VSS. While you can create the shadow copy, it is possible the applications with in-use files may not respond to the event and do what is required to make sure you get a consistent copy.

What you almost certainly want to do is to use the Diskshadow command to create a shadow copy, and then temporarily mount it as a volume. Once you do that you can use robocopy/teracopy or favorite tool to make a copy. Here is the set of files that I use to make a backup using VSS of one of my systems. There is another example that is part of the MS docs I linked to.

shadowbackup.bat

@echo off
o:
cd \shadow
del o:\shadow\*.cab
diskshadow -s diskshadow_script.txt
robocopy /mir S:\data\ \\srv-backup\backupshare\srv01\

diskshadow_script.txt

delete shadows exposed s:
set context persistent nowriters
set verbose on
add volume o: alias Backup
create
expose %Backup% S:
share|improve this answer
    
If I need to copy a 5MB folder on an almost full 1TB disk, this will create another 1TB of unnecessary backup data, won't it? You're right that I'm looking for a functionality similar to VSS, but without the "volume" part. If it exists... –  Borek Feb 26 '12 at 20:34
    
diskshadow is calling the VSS API. It won't take up any additional space. Or at least not much. VSS is a copy-on-write technology. So until you delete the particular shadow that you create with diskshadow any new writes to the volume will take up space, since a copy of the unchanged file, and any new writes must be saved. If space is an issue, just make sure you use diskshadows to delete the shadow volume as soon as you are done with it. –  Zoredache Feb 26 '12 at 20:37
    
Ah OK I think I understand your solution now. Didn't know that you could mount a volume in a "frozen" state without actually making a full backup of it. Is there any application that would automate this for me? Like mounting the volume when copying starts and unmounting it when it finishes? I don't want to deal with VSS details myself (I don't have any experience with command-line VSS and don't want to lose data due to some incorrect command). –  Borek Feb 26 '12 at 20:50
    
I am not aware of any GUI tools. –  Zoredache Feb 26 '12 at 21:30
1  
I would have down voted this, but I don't have the reputation - diskshadow is not actually a part of Windows 7, it's introduced in Windows 8 - technet.microsoft.com/en-us/library/cc772172.aspx. For Windows 7, you'll need to use vssadmin, which exposes the same functionality in a less convenient fashion. –  SamStephens Jun 12 at 15:27

Try Hobocopy from Wangdera Tools and Utilities.

share|improve this answer
2  
Nice find, thanks. –  Borek Feb 27 '12 at 1:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.