copy windows registry and/or other locked files

0

While improving my (personal) backup system, I noticed, that I cannot copy certain locked files, like the windows registry files. Is there a way to copy such things? Or a specific solution for the registry (I know of the regedit->File->Export ,,solution'' but this is to text format and seems slow). AFAIK, on Linux the locking system is advisory and on Windows it is mandatory. Can I somehow bypass the mandatory-ness for backup purposes etc.? TIA.

KarolDepka

Posted 2010-04-10T13:42:08.890

Reputation: 805

I use Java and can write additional code in C,C++,C# if necessary. Oh, and having written that, this question also qualifies for stackoverflow, hmmm. – KarolDepka – 2010-04-10T13:43:50.153

Also do You know, how commercial backup programs handle this (if at all)? I am gonna test Acronis ,,Backup and Recovery'' app soon. – KarolDepka – 2010-04-10T14:58:41.977

Answers

0

From Wikipedia:

Shadow Copy (Volume Snapshot Service or Volume Shadow copy Service or VSS ), is a technology included in Microsoft Windows that allows taking manual or automatic backup copies or snapshots of data, even if it has a lock...

Hugh Allen

Posted 2010-04-10T13:42:08.890

Reputation: 8 620

...and VSS is a bit tricky to drive programmatically... – Roger Lipscombe – 2010-04-10T16:05:19.700

How hard to drive programmatically? – KarolDepka – 2010-04-10T19:28:28.390

0

I wrote some scripts a while ago to do exactly this. They use volume shadow copy to create a temporary snapshot, then copy the files from the snapshot before releasing it.

And I used Robocopy to do the copying, so if the file already exists in the target folder and hasn't changed then it is skipped.

It works extremely well, when run every day it only took about 2 minutes to "freshen" a backup of the system volume of a win2003 server. With a small amount of stuffing around you can get the backup of an XP or a win2003 system volume to boot. (Details on how to do this are in a text file in the linked archive.)

I never tried to get a backup of a 7/vista/2008 system volume to boot, but I'm sure that would be possible too.

You can download the script and related tools from here: http://drop.io/vssbackupscripts

Let me know if you find them useful!

John Sinclair

Posted 2010-04-10T13:42:08.890

Reputation: 400