BackupPC-users

Re: [BackupPC-users] Bare metal restores

2012-04-27 11:26:00
Subject: Re: [BackupPC-users] Bare metal restores
From: "Kenneth L. Owen" <tx836519 AT bellsouth DOT net>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Fri, 27 Apr 2012 11:24:38 -0400
Hi Brad,

I am NOT much more than a neophyte on Linux, so take all of this with a grain of salt.

Having run Windows for many years, I had Ghost for imaging drives.  The earlier versions of Ghost could do ext2.

I run an with /home on another drive formatted ext3.  I run Ghost to image the ext2 boot system resulting in about a 2 GB file that will fit on a DVD.
If the boot HD fails, I replace the drive and restore the image, update, install applications to get back into business.

-- ken

On Fri, 2012-04-27 at 10:45 -0400, Brad Alexander wrote:
Hey,

I'm on the horns of a dilemma, as they say. I upgraded my workstation,
and got this bright idea to downsize my hard drive, since I had to
reinstall from scratch anyway...Well, it didn't work out so well,
because I went from a (silent) Samsung to a (noisy) Maxtor. In any
case, I can no longer deal with the "crunchies" that the Maxtor makes,
and I want to go back to the Samsung drive.

So I decided the best approach was to do a Debian/squeeze build (the
machine runs sid), then restore from backups. The problem I had with
this approach is that grub and LVM and cryptsetup all seem to have the
UUIDs from the Maxtor drive embedded in their setups, and when I try
to restore from backups, they don't match the ones generated for the
Samsung drive. I booted on the grml live cd, mounted all filesystems:

/dev/mapper/vg00-root        972332    581840    341752  63% /mnt/external
/dev/sda2                          496446     92894    378552  20%
/mnt/external/boot
/dev/mapper/vg00-home      38973576  31241272   5779332  85% /mnt/external/home
/dev/mapper/vg00-opt        2921604   1320676   1454496  48% /mnt/external/opt
/dev/mapper/vg00-usr       14597932   7501052   6364516  55% /mnt/external/usr
/dev/mapper/vg00-usrlocal   2921604    178336   2596836   7%
/mnt/external/usr/local
/dev/mapper/vg00-var        4867772   1728268   2895384  38% /mnt/external/var
/dev/mapper/vg00-archive   41332128  17949584  21285868  46% /media/archive

I then did a mount --bind from the grml cd of /dev, /proc, /sys and
/run and did a chroot onto the filesystem of the drive, and tried to
reinstall grub. It reinstalled, but at the end it said

grub-probe: error: no such disk.

And sure enough, grub couldn't find anything to boot.

So my question at this juncture is what is the best way to restore
everything to the Samsung drive? Since the drive is encrypted, I used
the Debian installer to encrypt the filesystem. I'm wondering what my
best approach would be. I figure my options are:

* go in and find every occurrence of every UUID on the system and change them;
* somehow nuke everything on the Samsung and restore from backups, but
I think the UUIDs are generated from the drive itself (since I am
mounting /dev, and therefore, /dev/disk/by-uuid from the live CD), so
I suspect that I would end up in the same situation anyway;
* do it the old school way, install Debian, upgrade to sid, reinstall
all of the packages, and then spend time configuring everything, which
is what I was trying to avoid in the first place. Admittedly, I have a
lot of it configured in puppet, but there are still things that aren't
yet. And besides, I think I'm overlooking something fairly important
here, that there should be an easy way to sort out the UUID issues.

Anyone got any ideas or suggestions?

Thanks,
--b

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/