Restoration from live environment

Asked by Alba Nader on 2013-03-18

Let's assume I am creating a snapshot of my current /root partition. Then my system crashes and I am longer able to boot into my system. Thus I cannot launch BIT to restore the snapshot. Will I be able to boot from a live CD, install and launch BIT from there and restore my snapshot for my system?

Question information

Language:
English Edit question
Status:
Solved
For:
Back In Time Edit question
Assignee:
No assignee Edit question
Solved by:
Germar
Solved:
2013-03-22
Last query:
2013-03-22
Last reply:
2013-03-20
Germar (germar) said : #1

This should work (didn't test it yet). All you've to do is to recreate the partitions ('/boot', '/' and swap) format and mount them ('mount /dev/sda2 /mnt; mkdir /mnt/boot; mount /dev/sda1 /mnt/boot'). Than you can restore everything into '/mnt'.
Finally you have to install grub. Take a look at https://help.ubuntu.com/community/Boot-Repair

__BUT__:
Normally this is not necessary. As long as you use your desktop like a normal user you don't need to backup all system files. In case of a hdd-crash you can install from live CD, restore the selection of apt-get and restore your /home folder.
Take a look at this: http://askubuntu.com/a/99151

I'd suppose to create a cronjob running daily as root with this tasks:
dpkg --get-selections > /home/<USER>/Package.list
cp /etc/apt/sources.list /home/<USER>/sources.list
apt-key exportall > /home/<USER>/Repo.keys

In this way all you need to backup with BackinTime is your /home/<USER> and maybe /etc

Alba Nader (sharepass12) said : #2

Thanks for your response.

You talked about recreating the partitions. Is LVM supported?

Best Germar (germar) said : #3

BIT works on files. It doesn't matter which partition or filesystem you have. As long as you can recreate those partitions and mount them in the supposed place you can restore all files into it.
To restore grub you may have to chroot into the restored system. For this you will have to mount /dev and /proc:
mount -o bind /dev /mnt/dev
mount -t proc /proc /mnt/proc

Depending on your distribution you also have to manually edit /etc/fstab to match the new partitions. If your restored /etc/fstab uses UUID's for partitions you have to replace them with the UUID's of your new partitions. Run 'sudo blkid' to find out these UUID's

Alba Nader (sharepass12) said : #4

Thanks Germar, that solved my question.