BackupPC-users

Re: [BackupPC-users] Debian / Ubuntu restore solution?

2013-12-10 10:01:58
Subject: Re: [BackupPC-users] Debian / Ubuntu restore solution?
From: Carl Wilhelm Soderstrom <chrome AT real-time DOT com>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Tue, 10 Dec 2013 10:00:28 -0500
On 12/10 01:12 , Adam Hardy wrote:
> What is the most effective approach for getting my system going on a
> new hard drive with BackupPC running and the other server config
> (gateway, DHCP, DNS etc)? Preferably without manually reconfiguring
> each software package.

As I understand it, What you're looking to do is to clone the existing
installation to a new hard drive. This is pretty simple with Linux.

* Plug the new drive into the old system somewhere.

* Ideally, boot the system with a rescue CD such as Knoppix. This gives you
an OS to work with the system independent of the OS instance you're trying
to copy.

* Copy the contents of the old disk to the new one using 'dd'. This will
make a bitwise copy of the disk, and thus bypass all the problems with
linking vast numbers of hard links which would otherwise make this operation
take a week. Obviously, your new disk must be larger than the old one. The
command will be something like "dd if=/dev/sda of=/dev/sdb".

* Expand the filesystem to the size of the new disk. Most modern filesystems
support this, but the tool to use will depend on what FS you have.

* You will need to rewrite the bootloader to the boot sector of the new
disk, presumably using grub-install. This can get tricky. I find it best to
chroot to the environment on the new disk, mount /dev/ and /proc, then run
grub-install from there. So, presuming that your new disk is /dev/sdb and
mounted on /mnt/newdisk, the commands will be something like:
chroot /mnt/newdisk
mount /dev
mount /proc
grub-install --recheck /dev/sdb
umount /dev
umount /proc
exit

Now shut down the system, remove the old drive, and put the new drive
whereever you like on the device chain. Boot, and see if you got the
bootloader correct.

Note that I'm writing this in the morning, it's been a couple of months
since I last did this sort of thing, and my knowledge of your situation is
limited. So my command suggestions should not be trusted or carried out
without fully understanding them first.

-- 
Carl Soderstrom
Systems Administrator
Real-Time Enterprises
www.real-time.com

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
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/