Which folders do I need to restore from a backup of my Ubuntu 11.10 installation to get the original state back except the harddisk change?
Details:
I installed Ubuntu 11.10 on my internal SSD-Disk (SATA,60GB) and used my sofware-RAID5 array (3 internal disks, SATA) only for backups.
I backed up the whole SSD-Disk with Back-In-Time(root). Now my SSD-disk failed and I plugged in a new disk (120GB, SATA) instead.
Then I installed Ubuntu from a live-CD again. Then I installed "mdadm" and "backintime" from software center.
My RAID5 array wasn't shown in Nautilus and disk utilities, but I brought it back typing "sudo mdadm –assemble –scan" in a terminal window and mounting it in Nautilus afterwards. Backintime wasn't showing the snapshots until I changed the host name to the old name. Backintime now shows me following folders/files to restore:
- bin
- boot
- cdrom
- dev
- etc
- home
- lib
- lib32
- lib64
- lost+found
- media
- mnt
- opt
- proc
- root
- run
- sbin
- selinux
- srv
- sys
- tmp
- usr
- var
- !initrd.img
- vmlinuz
- initrd.img.old
- vmlinuz.old
Then on my first try I restored every folder (which was a kind of silly, because it was deleting all the content of the excluded folder like "sys" instead of ignoring it). After rebooting, I got always the error "error: no such device: 3b45…" while booting and Ubuntu desktop didn't come up.
Then on my second try after reinstalling Ubuntu I restored everything except following folders:
- /dev
- /proc
- /sys
- /media
- /mnt
- /cdrom
But I still got the same error. Grub comes up, but then before showing the desktop it gets stuck with the same error message "error:
no such device: 3b45…". So I installed Ubuntu from Live-Cd again.
Now the important question for my third try is: which file or folder must I exclude to get my machine running? That means all my personal data and installed programs and ubuntu-updates back as it was like before, except that I now have got a different hard disk.
My back-in-time-settings of my last backup:
include "\",
and excludes following folders/files:
- .gvfs
- /home//.mozilla/firefox/.default/Cache
- /home//.mozilla/firefox/.default/OfflineCache
- /home/*/.local/share/Trash
- /dev/*
- /proc/*
- /tmp/*
- /sys/*
- /media/*
- /mnt/*
- /var/cache/*
- .cache*
- /lost+found/*
- /var/tmp/*
- /cdrom/*
- [Cc]ache*
- .thumbnails*
- [Tt]rash*
- .backup
- *~
- /root/Ubuntu One
- .dropbox*
(It seems this list is faulty and incomplete, but I am just starting to learn Ubuntu. Next time I will delete the "/*" at the end of the ignored directories. More improvement suggestions of this list are welcome).
Best Answer
The error you experienced is because you restored your /etc/fstab file from your backup. Every partition has a unique identifier (uuid) which is used to mount the required root partition at boot time, even when the disk order has changed for some reason.
For a backup of settings in etc, you should be very selective and only backup things you changed manually. For normal backups I would recommend
/home/*
and rundpkg --get-selections > my-installed-apps
and restore home and rundpkg --set-selections < my-installed-apps
to restore everything.