Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'd like to do thorough backups, but want to avoid backing up files which can be replaced via apt.

Does this effectively just consist of omitting /usr, with the exception of /usr/local, as well as /lib*, from the backup?

Do some backup apps provide this functionality?

share|improve this question

3 Answers 3

Just back up /home (user files and settings) and /etc (system settings) - everything else can restored by reinstalling Ubuntu and installing software from the repositories.

If you've manually edited any other locations (this includes installing software from using other methods than package manager), you will need to back up those as well.

share|improve this answer
1  
Except for stuff in /var, /srv, /usr/local, and possibly /opt... no? I might also have system-specific settings in /boot/grub/menu.lst (or the grub2 equivalent) that should be retained. I could also have modified the /root home directory. –  intuited Feb 5 '11 at 15:43

The following may be excluded even if you are backing up data changed by apt in a root filesystem.

/lost+found /media /mnt /cdrom /sys /tmp /proc /var/cache /dev

Now others like /etc /boot /bin /sbin are also managed by apt. So essentially what you need to backup would be /home, /opt, /usr/local/bin, /root and if you like to keep the logs /var. If you change/edit configuration files, /etc needs to be backed up as well

/var/cache/apt will have packages installed by you. So that needs to be backed up either using native utilities or using apt-cd

share|improve this answer
    
There's much more in /var than logs... for example, my /var/lib contains 102 directories. Presumably some of that stuff is worth keeping, or it would be in /var/cache. –  intuited Feb 5 '11 at 15:51
    
I also don't think there's much point in keeping /usr/local/bin without /usr/local/lib, /usr/local/share, etc. –  intuited Feb 5 '11 at 15:53
1  
Apart from logs everything else, will come back including /var/lib when you re-install same packages. Anything you edited/changed have to be re-done , unless backed up. If you dont want to preserve logs, there is nothing needs to be backed apart from your changed configuration files, /home and any source compiled programs and its data and /root. If you have database/ebserver running you will need to backup those from /var as well –  Jamess Feb 5 '11 at 15:57

If the system critical, a backup which allows a baremetal recovery will be great. Refer http://www.zdnet.com/blog/btl/geek-sheet-bare-metal-backup-and-recovery/8759 for a good process

This is good in case you want to revert to a level, not to the latest and greatest updates from Ubuntu Software Center.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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