LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-29-2016, 05:52 AM   #1
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,717

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Question What are the most important system files to make a backup of?


Hi.

On a fresh Debian install, what are the most important system files to make a backup of?

e.g.
Code:
sudo cp /etc/hosts /etc/hosts.default
Thanks.
 
Old 10-29-2016, 11:07 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
What changes have you made since the fresh install?
 
Old 10-29-2016, 02:56 PM   #3
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,717

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Quote:
Originally Posted by michaelk View Post
What changes have you made since the fresh install?
Hi Michael.

I just did the things to get up and running: setup wireless networking driver, use Nouveau drivers, etc.
 
Old 10-29-2016, 03:11 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Depends on the person but at the moment I would not consider anything important...
 
Old 10-29-2016, 03:34 PM   #5
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 750

Rep: Reputation: 156Reputation: 156
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.
 
Old 10-29-2016, 03:53 PM   #6
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
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.
 
Old 10-29-2016, 04:01 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
as to system files VS personal data

ALL!!! the personal stuff

but system files

really only the ones you make custom edits to
and most of those will be in your home folder

fstab if you manually add custom mount points
custom files in /etc/system.d
if you use a /etc/profile.local for system paths
 
Old 10-29-2016, 04:05 PM   #8
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
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.
 
Old 10-29-2016, 04:10 PM   #9
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
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".
 
Old 10-30-2016, 10:09 AM   #10
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,717

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Thumbs up

Thanks all.
 
  


Reply

Tags
backup, debian, system files



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
deep freeze important files system for example root ,/boot , /etc mahdi-sh Ubuntu 2 02-24-2015 01:36 AM
[SOLVED] Which are the most important files to backup in a Debian server? gacanepa Linux - Newbie 5 10-31-2012 09:59 AM
list Important files to backup linuxandtsm Linux - Newbie 5 03-06-2012 07:00 AM
important system files backup manishrmusale Linux - General 2 06-08-2011 07:24 AM
Using rsnapshot to make a system backup Transition Slackware 1 03-21-2005 09:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 02:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration