I maintain a weekly updated backup of my whole hard disk with Kubuntu 14.04, thanks to Rsync. I rarely need to restore the back up, but today I did something nasty to my OS, too complex to try to fix it myself and I would like to restore the files of the back up blindly.

The problem is, I shrunk the main partition yesterday. If I restore everything, I am afraid I will overwrite some critical linux files containing information about the physical drive and the partition and it will make things worse.

What are the files I should avoid overwriting with those in the backup? I guess it must be something within the /dev folder, but which ones exactly?


To my knowledge, there are no files in Ubuntu which store or are dependent on the physical characteristics of the hard drive. All the information about the partitions is stored in the MBR and other data structures, which are outside of any filesystems (doing otherwise would create a chicken-and-egg problem, right? :)).

The only file which comes to mind is /etc/fstab, which contains UUID of partitions - if those UUIDs changed then obviously you should not override that file.

Also, /dev, /proc and /sys are virtual filesystems - they don't contain real files, rather they provide a view into kernel's internal data and configuration. You should not backup those directories and you definitely should not attempt to restore them from a backup.

If your system boots, I would also probably avoid touching /boot, just in case.

  • You are right. I have overwritten the shrunken partition and have had a few problems. I wouldn't boot and it said "error: no such device /dev/disk/by-uuid/...". It seems that the old /etc/fstab file had a reference to a non existing partition. Also, there were problems with the grub menu. I repaired it thanks to boot-repair (btw, a nice free program). – Mephisto Feb 28 '15 at 12:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.