[SOLVED] What are the most important system files to make a backup of?
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
On a fresh install I don't see anything as important as it is straight off the DVD. Going forward I backup /etc/fstab as I have a number of hard drives and I like to know how they are mounted (eg. UUIDs, mount points). This may not be debian related (I am a Fedora user) but I back up /usr/local/sbin & /usr/share/applications as these contain desktop shortcuts which are a pain to rewrite.
Once you have configured your repositories you probably want to back up your sources.list file (inside /etc/apt/), as it will save you some searching in the future if you need to reinstall the same Debian version. Likewise, if you're using a xorg.conf file, you might want to back it up.
Basically, I would back up the files from /etc modified since the install in order to get things up and running.
I would only back up things that I had changed after the initial install, such as /etc/apt/sources.list (because I add "contrib non-free" and also "deb http://www.deb-multimedia.org jessie main non-free"). I back them up to a file server or thumbdrive, so I can remember the stuff I customized later on. It is actually quite unhelpful to back up anything I haven't manually changed, because it would just be useless junk to sift past if I want to use them to help me customize a new install.
There is ONE exception - the /etc/ssh directory. Assuming you install the ssh server (for remote access to the computer), it will by default generate a new random ssh identity keys. If you do a new install, the new keys will be different. This can be a problem if you want to do a fresh install of an existing server, and your other computers will see the ssh keys have changed (and complain about it!). You can avert this problem by backing up the /etc/ssh directory, and copying it over when doing a fresh install.
But bear in mind, keeping this backup secure is very important! If you don't really understand how to keep this backup folder secure, don't do it. Just make a temporary copy of /etc/ssh if you need to do a fresh reinstall, and delete the temporary copy after you get the new install up and running. It's better for you to have to deal with the annoyance of manually deleting the remembered public keys on your other computers, then for you to leave the backup of the private keys somewhere that has become security compromised.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
The only files I keep a backup of are xorg.conf because I use an NVIDIA card and that's perhaps only out of superstition as I'll admit I'm not 100% sure I need it, 91-spacenavigator.rules so that my Space Navigator works and drivers.ini for Google Earth so that my Space Naigator works in that. I'll modify fstab and sources.list but the former I start anew so that, initially, I don't mount my old /home on an install in case configuration files get overwritten with older versions before I update everything and the latter I leave also in case a new install finds faster mirrors and the like. All this being on my desktop -- any laptops I just install from scratch including wiping home.
Things like hosts and ssh.conf and sshd.conf I might think about backing up for convenience if I thought it would speed things up.
I have looked into backing up which programs I installed through apt also because that seems a really good idea when it first comes to mind. Then I recall that I'll install things, uninstall them, install an alternative, upgrade and loose something, re-install the original because it's now better than the alternative.... You get the picture.
Of course, this is from the perspective of somebody who's usually only got a desktop and a laptop on the go at the same time and the desktop's only one with a media collection on a few different disks, discrete graphics with dual monitors and some other "tweaks".
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.