15

I need to accomplish a clean install after a bad graphics driver issue.

Which are the files I must backup to keep all users settings in Linux?

My distro is fuduntu.

4
  • 1
    I edited your question, if you are unhappy with the changes you can revert or edit again.
    – Baarn
    Jun 18, 2012 at 19:01
  • 3
    Basically you need to backup your /home directory, but depending on your usage or installations it would help to backup /etc /usr and /var. But chances are that you copy a bad config file over to the fresh system. I'd recommend to fix the problem instead of doing a clean install.
    – Baarn
    Jun 18, 2012 at 19:03
  • I had tryed [code] yum history -undo <few last installs id> [code] but it didn't help me. Also boouting with different vga modes "vga=ask" is helpless. Just terminal is accesible. So i can rm or copy or made other files operations. It freeze in boot a graphical shell gnome.
    – Yurij73
    Jun 18, 2012 at 19:15
  • 1
    @Yurij73: You can surround code with ` and ` (backquote) in comments and answers.
    – Linuxios
    Jun 19, 2012 at 13:54

1 Answer 1

14

The bare minimum would be to keep the user's own files within /home. Also, in order to know which files to keep from /etc it is beneficial to use a system like etckeeper that can track history of changes to /etc and who made them. IE - were they distribution changes, or changes that you made?

For the back up itself, I always copy the following:

/usr/local
/usr/share
/home
/var
/etc
/root

There are ways to back these up using Rsync to a separate area, using hardlinks so that additional space is not used on subsequent backups.

You can then restore /home/* as is, but you will want to pick specific files/folders as needed from /var and /etc. You will know if you need something specific from /usr/local, because most likely you will have put it there purposely.

The contents of /var and /usr/share can be tricky. Apache, mediawiki, wordpress, and various other services store data in either. You should know if you have any data stored in these by the configuration you did when you set up these services. If you don't run any 'server' or 'web' services, you may be safe not backing these up, but it's always wiser to backup than to wish you had backed up.

Unless you have hand-edited things in /etc you probably are safe with a clean config. If you do have hand-made-changes in /etc, it is best to port them over by hand so you know exactly what you are introducing to the clean system.

/opt may also be a directory of concern. It is usually created when installing software distributed with it's own installer from software outside of your distribution. Backing up this is an option, but you may want to re-install those packages - as they have configurations that require links back into /etc

1
  • 1
    im assuming by /user you mean /home/[username], although it sounds like you were trying to say /usr and added a letter. migh want to edit to clarify this Nov 20, 2018 at 20:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .