| View previous topic :: View next topic |
| Author |
Message |
Michael Stowe Guest
|
|
| Back to top |
|
 |
Michael Stowe Guest
|
Posted: Mon Mar 08, 2010 8:43 am Post subject: Bare Metal Restore for Microsoft Windows XP |
|
|
| Quote: | On Sat, 6 Mar 2010, Michael Stowe wrote:
| Quote: |
Out of necessity, I had an opportunity to try out restoring a system
from
scratch with nothing but BackupPC backups. I'm happy to report that the
process works, with a few limitations and quirks.
I've documented it here:
http://www.goodjobsucking.com/?p=219
|
How does this handle ACL's and file owernship and permissions and the
like?
Mike
|
Not ... wonderfully. On the plus side, it does seem to handle the "read
only" flag, but it seems to lose the "system" and "hidden" flags.
As for ownership and permissions, I'm afraid I can't be certain. On the
one hand, they *seem* fine, but I'm not sure if that's because they were
preserved or if that happens to be the default. I'm not doing anything
fancy with either.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/ |
|
| Back to top |
|
 |
Michael Stowe Guest
|
Posted: Mon Mar 08, 2010 11:29 am Post subject: Bare Metal Restore for Microsoft Windows XP |
|
|
| Quote: | Although I haven't tested it on a bare metal restore, I believe that
my code that runs subinacl (and also optionally getfacl) to back up
the Windows ACL's should take care of all file ownership, permissions,
and ACLs (note that 'getfacl' only captures a subset of the full
Windows acl's).
|
Does this happen to include the "hidden" and "system" attributes?
| Quote: | Of course, beyond that there are other potential NTFS 'features' that
might not get restored such as junctions, alternative data streams,
etc. -- though typically they are rare in WinXP.
|
In theory, junctions would be recreated by any hard links in the tar file,
though I didn't have any reason to try it out.
| Quote: | Thanks for the write-up - very helpful!
Couple of questions:
1. Once you have installed cygwin, why not just use rsync to restore
rather than first creating a tar archive?
|
The main reason is those three hardcoded directory paths -- chiefly
C:\WINDOWS, which tends to have a lot of open files that cannot be
overwritten. I suppose you could restore those three directories to
alternative locations, but in my experimenting, rsync would throw errors
and stop working, I'm not sure why.
| Quote: | 2. Is the Recovery Console approach necessary? I believe that WinXP
Home bundled by a lot of hardware vendors doesn't include
it. Couldn't you just restore a bare-bones configuration, boot it
up and then proceed as you did
|
It's included on every XP CD that I'm aware of, including Home, but it
does need to be either installed (for OEM versions, from the \i386
directory) or booted from (some vendors place it on a recovery or tools
partition.)
It's necessary in that I know no other way to replace the "windows"
directory.
| Quote: | 3. Can you explain the reason for "set AllowWildCards = TRUE"?
Also, more generally, what if anything is the advantage of using
the MS shell to rename rather than just using cygwin 'mv'? Does
'ren' do a better job with setting default ACL's.
|
Err... Whoops, that was supposed to read "set AllowAllPaths = TRUE" not
WildCards, which doesn't do a lot.
It's required only because otherwise, the Recovery Console won't let you
do anything outside \WINDOWS.
| Quote: | 4. How are you able to rename for example the WINDOWS directory since
it presumably has open files? (or is this the reason and rationale
behind using the recovery console)
|
That's exactly the reason behind using the Recovery Console.
| Quote: | 5. At what point in the process did you restore the registry or did
you just treat them as regular files that are part of your backuppc
backup?
|
The registry was backed up as regular files using Volume Shadow Copies,
and restored as regular files into the same locations. Switching the
"\WINDOWS" directories switched the registry, as well as all related
files.
| Quote: | 6. Rather than installing cygwin, using the Recovery console etc.,
would it be faster/simpler/safer to boot from a Linux cd/dvd (after
creating the minimalist system install) and then from linux restore
the backuppc shares and rename the directories. Then you could boot
back up (hopefully) in Windows and run subinacl if you want to make
sure the acls's are all correct.
|
I did try this, and it didn't work -- in my case, because Linux didn't
happen to recognize my controller card, or its metadata for the mirror --
and when I tried it on another system, for reasons I'm uncertain of, it
threw errors with the tar file for some paths, and choked on symbolic
links. Due to the driver issues, I didn't pursue it further. (I had
hoped for something relatively simple, like booting to a LiveCD, mounting
the drives using ntfs-3g, and simply rsync'ing the latest recovery; I
assume this is probably possible with the right tweaking and drivers.)
| Quote: | Thanks again for sharing your experiences...
|
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/ |
|
| Back to top |
|
 |
Jeffrey J. Kosowsky Guest
|
Posted: Mon Mar 08, 2010 11:52 am Post subject: Bare Metal Restore for Microsoft Windows XP |
|
|
Michael Stowe wrote at about 10:40:04 -0600 on Monday, March 8, 2010:
| Quote: | | Quote: | On Sat, 6 Mar 2010, Michael Stowe wrote:
| Quote: |
Out of necessity, I had an opportunity to try out restoring a system
from
scratch with nothing but BackupPC backups. I'm happy to report that the
process works, with a few limitations and quirks.
I've documented it here:
http://www.goodjobsucking.com/?p=219
|
How does this handle ACL's and file owernship and permissions and the
like?
Mike
|
Not ... wonderfully. On the plus side, it does seem to handle the "read
only" flag, but it seems to lose the "system" and "hidden" flags.
|
Well, I imagine that is understandable since backuppc doesn't handle
acl's and only does unix-like permissions.
| Quote: | As for ownership and permissions, I'm afraid I can't be certain. On the
one hand, they *seem* fine, but I'm not sure if that's because they were
preserved or if that happens to be the default. I'm not doing anything
fancy with either.
|
Although I haven't tested it on a bare metal restore, I believe that
my code that runs subinacl (and also optionally getfacl) to back up
the Windows ACL's should take care of all file ownership, permissions,
and ACLs (note that 'getfacl' only captures a subset of the full
Windows acl's).
Of course, beyond that there are other potential NTFS 'features' that
might not get restored such as junctions, alternative data streams,
etc. -- though typically they are rare in WinXP.
Thanks for the write-up - very helpful!
Couple of questions:
1. Once you have installed cygwin, why not just use rsync to restore
rather than first creating a tar archive?
2. Is the Recovery Console approach necessary? I believe that WinXP
Home bundled by a lot of hardware vendors doesn't include
it. Couldn't you just restore a bare-bones configuration, boot it
up and then proceed as you did
3. Can you explain the reason for "set AllowWildCards = TRUE"?
Also, more generally, what if anything is the advantage of using
the MS shell to rename rather than just using cygwin 'mv'? Does
'ren' do a better job with setting default ACL's.
4. How are you able to rename for example the WINDOWS directory since
it presumably has open files? (or is this the reason and rationale
behind using the recovery console)
5. At what point in the process did you restore the registry or did
you just treat them as regular files that are part of your backuppc
backup?
6. Rather than installing cygwin, using the Recovery console etc.,
would it be faster/simpler/safer to boot from a Linux cd/dvd (after
creating the minimalist system install) and then from linux restore
the backuppc shares and rename the directories. Then you could boot
back up (hopefully) in Windows and run subinacl if you want to make
sure the acls's are all correct.
Thanks again for sharing your experiences...
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/ |
|
| Back to top |
|
 |
three_jeeps
Joined: 19 Jan 2010 Posts: 25
|
Posted: Mon Mar 08, 2010 12:31 pm Post subject: Bare Metal Restore for Microsoft Windows XP |
|
|
Perhaps I missed something in reading this, or my interpretation of a 'bare metal restore' is different from yours.
My definition of 'bare metal restore' is taking essentially an image of the current disk, copying it to some media, and then using that image to do a bit-by-bit (sector-by-sector, track-by-track) copy from the backup medium to the target medium. For me, the bit by bit copy is primary for the OS, and possibly including the application programs (word, ppoint, etc.) I don't buy into the M$ organization of files and disks. I partition my hd for OS, Applications, and User Data. I baremetal restore the OS partition and usually the Application partition using Acronis True Image. (True Image is more or less functionally equivalent to Norton Ghost-the enterprise version, not the butched commercial version they have sold in stores since V9 (I think)). I store the images on a NAS that is backed up.
I do restores in one of two ways: Use the restore CD that Acronis allows you to make-bareboot the machine, the pull the image from a server, or, netboot the machine, and using an image loader, pull the restore image from the server and put it on the HD.
Once the target machine is capable of booting the newly restored image, you can run backup pc (which I gave up on some time ago) or whatever your favorite backup program is, and copy the backed up user data area to the target HD.
In your writeup, you talk about reinstalling windows just to get a working copy of the OS "if anything’s installed or working, you’re going to wipe it all out anyway" so why essentially do the install twice?
Your method does allow for the most recent (more or less) snapshot of most of the relevant windoz files but doing an image every so often would essentially do the same thing. In many cases, it may actually be better to install a clean load image of the OS and apps, rather than restore something that may be corrupted/virus infected. In systems where I have this concern, I have an image of a clean xp + backup program restore that I use. It is all done over the net, minimal (if any) manual intervention at the target machine. If need be, I can also remove the target HD, connect it to the NAS, then copy the image directly via the SATA/IDE interface, then put the disk back in the target machine.
Sorry, but I don't see how this method is a baremetal restore with a manual step in installing windoz. Your still screwing around with loading via CD a copy of XP, and then cgwin, and then 'manually copying' files in the XP subdirectories. Seems like a lot of places for things to fall through the cracks with file contents not being 'in synch' and I also wonder about registry consistency and backup.
It may, however, work fine in your environment.
-J
On Sat, Mar 6, 2010 at 1:08 AM, Michael Stowe <mstowe < at > chicago.us.mensa.org ([email]mstowe < at > chicago.us.mensa.org[/email])> wrote:
|
|
| Back to top |
|
 |
Michael Stowe Guest
|
Posted: Mon Mar 08, 2010 1:02 pm Post subject: Bare Metal Restore for Microsoft Windows XP |
|
|
| Quote: | Perhaps I missed something in reading this, or my interpretation of a
'bare metal restore' is different from yours.
|
I use the term "bare metal" in the sense that when the process is started,
there is no software or operating system installed. In other words, I'm
talking about the system being bare metal, not BackupPC being a "bare
metal restore" imaging program.
| Quote: | My definition of 'bare metal restore' is taking essentially an image of
the
current disk, copying it to some media, and then using that image to do a
bit-by-bit (sector-by-sector, track-by-track) copy from the backup medium
to
the target medium. For me, the bit by bit copy is primary for the OS, and
possibly including the application programs (word, ppoint, etc.) I don't
buy into the M$ organization of files and disks. I partition my hd for
OS,
Applications, and User Data. I baremetal restore the OS partition and
usually the Application partition using Acronis True Image. (True Image is
more or less functionally equivalent to Norton Ghost-the enterprise
version,
not the butched commercial version they have sold in stores since V9 (I
think)). I store the images on a NAS that is backed up.
I do restores in one of two ways: Use the restore CD that Acronis allows
you
to make-bareboot the machine, the pull the image from a server, or,
netboot
the machine, and using an image loader, pull the restore image from the
server and put it on the HD.
Once the target machine is capable of booting the newly restored image,
you
can run backup pc (which I gave up on some time ago) or whatever your
favorite backup program is, and copy the backed up user data area to the
target HD.
|
I'm not really advocating that people start *planning* on recovering full
operating systems using nothing but BackupPC, I'm only suggesting that
it's possible if that's all you happen to have.
| Quote: | In your writeup, you talk about reinstalling windows just to get a working
copy of the OS "if anything’s installed or working, you’re going to wipe
it all out anyway" so why essentially do the install twice?
|
1) Because BackupPC doesn't have a LiveCD that does recoveries
2) Because Windows XP has never had a LiveCD
3) Because you still need boot sectors, even if either 1 or 2 were true
The technique as outlined does allow you to recover on pretty much any
hardware that Microsoft XP supports, which includes "raid" cards,
proprietary metadata and exotic controllers.
Note that the entire registry is recovered as well.
| Quote: | Your method does allow for the most recent (more or less) snapshot of most
of the relevant windoz files but doing an image every so often would
essentially do the same thing.
|
To clarify a bit: it allows for 100% of the files to be recovered, but
permissions/owners/flags are not fully preserved.
| Quote: | In many cases, it may actually be better
to install a clean load image of the OS and apps, rather than restore
something that may be corrupted/virus infected.
|
I'm also not advocating this recovery method in all cases (obviously.)
| Quote: | In systems where I have this
concern,
I have an image of a clean xp + backup program restore that I use. It is
all
done over the net, minimal (if any) manual intervention at the target
machine. If need be, I can also remove the target HD, connect it to the
NAS, then copy the image directly via the SATA/IDE interface, then put the
disk back in the target machine.
|
I have something similar, it's just not always the best choice. Note that
I've also documented extracting specific registry keys from BackupPC
backups in cases where you need to retrieve, for example, an installation
key.
| Quote: | Sorry, but I don't see how this method is a baremetal restore with a
manual step in installing windoz. Your still screwing around with loading
via CD a copy of XP, and then cgwin, and then 'manually copying' files in
the XP subdirectories. Seems like a lot of places for things to fall
through the cracks with file contents not being 'in synch' and I also
wonder about registry consistency and backup.
|
As I mentioned, one starts with bare metal -- it's not an unattended bare
metal restore.
As I documented, there are three directories that need to be renamed (six
if you count the ones you're replacing.) The registry is perfectly intact
and consistent; naturally this requires one of the rsync/VSS methods that
have been outlined here before. As, frankly, is every other file, which
includes databases, Outlook, and so on. (It does highlight the need to
use rsync/VSS and not just use rsync or SMB.)
| Quote: | It may, however, work fine in your environment.
-J
|
I expect it to work as documented in anybody's environment, with the
quirks and limitations outlined. Whether or not somebody can live with
that certainly depends on their environment.
As I've mentioned, I don't think I'd plan on this being my only recovery
method, but it's worth documenting because it does actually work, and I've
been around long enough to know that it's not unusual for more than one
thing to go horribly, horribly wrong, and the same voltage surge that
burned out both drives in your mirrored pair may have killed your image
backup as well.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/ |
|
| Back to top |
|
 |
Jeffrey J. Kosowsky Guest
|
Posted: Mon Mar 08, 2010 2:23 pm Post subject: Bare Metal Restore for Microsoft Windows XP |
|
|
Michael Stowe wrote at about 15:00:06 -0600 on Monday, March 8, 2010:
| Quote: | | Quote: | Your method does allow for the most recent (more or less) snapshot of most
of the relevant windoz files but doing an image every so often would
essentially do the same thing.
|
To clarify a bit: it allows for 100% of the files to be recovered, but
permissions/owners/flags are not fully preserved.
|
Technically, it allows for 100% of the files to be recovered that
cygwin rsync/tar or smb can see. There are ntfs files that won't be
recovered such as NTFS alternate data streams (the data will actually
be *lost* since cygwin explicitly doesn't handle such non-POSIX
files). Also, junctions won't necessarily be recovered (though
in many/most cases at least one copy of the data will be somewhere
else on the system)
Sorry for the nit-picking
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/ |
|
| Back to top |
|
 |
Michael Stowe Guest
|
Posted: Mon Mar 08, 2010 3:01 pm Post subject: Bare Metal Restore for Microsoft Windows XP |
|
|
| Quote: | Michael Stowe wrote at about 15:00:06 -0600 on Monday, March 8, 2010:
| Quote: | | Quote: | Your method does allow for the most recent (more or less) snapshot of
|
| most
| Quote: | | Quote: | of the relevant windoz files but doing an image every so often would
essentially do the same thing.
|
To clarify a bit: it allows for 100% of the files to be recovered, but
permissions/owners/flags are not fully preserved.
|
Technically, it allows for 100% of the files to be recovered that
cygwin rsync/tar or smb can see. There are ntfs files that won't be
recovered such as NTFS alternate data streams (the data will actually
be *lost* since cygwin explicitly doesn't handle such non-POSIX
files). Also, junctions won't necessarily be recovered (though
in many/most cases at least one copy of the data will be somewhere
else on the system)
Sorry for the nit-picking
|
You're quite correct, and I forgot all about them. In XP, I -think- they
contain thumbnails, author and title attributes, and whether files were
downloaded from the Internet. A quick check demonstrates that "zip" files
that were downloaded and backed up are no longer marked as such after the
recovery, but the files have the exact same md5 sum (indicating that only
the main fork is considered.)
Of course, they can also be created manually as well, though I'm not aware
of any software that makes use of them for legitimate purposes. (I'm
aware of a few viruses that use them to hide chunks of code.)
I guess it's not a big deal for my XP systems, but I suspect this could be
a big problem... I'm not sure if Microsoft has increased the use of ADS
for Vista and Windows 7.
I did make a quick test for junctions, and they -appear- to work, but this
might just be reflexive since I used a cygwin hard link to create the
junction in the first place.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/ |
|
| Back to top |
|
 |
|