[sf-lug] What files are required to back up my "configuration"?

Rick Moen rick at linuxmafia.com
Tue Apr 30 11:33:50 PDT 2013


Quoting Shane Tzen (shane at faultymonk.org):

> So your choices are either to:
> 
> 1) trying to duplicate the existing setup almost identically, or
> 
> 2) take this as an opportunity to "tidy" up
> 
> Whether it's #1 or #2, I'd still take a more surgical approach.
>  Essentially, back up /root, /boot, /etc, /home, /opt, /usr/local, but
> don't just blast them onto the new system (obviously this doesn't apply to
> your personal/data files).

Really good point.  Original poster Michael didn't really say whether
the 'fresh installation' would be the same distro & release level, or 
a rebuild using something different.  You cannot just blithely duplicate
(in particular) /etc between different systems.  Nor would you
necessarily even want to reinstall all of your previous packages even if
they all exist for the new installation with the same names. which they
often don't (especially libs packages).

That is why my own standard technique is to snapshot /etc and the list
of installed packages to datestamped files written into /root (not into
/etc as I typo'ed upthread) to be preserved during rebuild, and then
refer to them rather than just reimplementing without scrutiny.

> If you want to know what was installed on the old system, you can do, `dpkg
> --get-selections |grep -v deinstall|cut -f1 > /path/to/installed.txt` and
> get a complete listing.  /etc contains almost all of the config files
> you'll care about, but I would suggest only manually and specifically
> copying the config files you actually need.  

> /home/username/.* are going to be various app settings/config files...

Unless caffeine deficiency is leading me astry, ~/.* isn't quite right,
any more than ~/.??* is.  You're accidentally matching dot and
double-dot, I think.

Me, I always preserve at least ~/.bashrc and ~/.vimrc .






More information about the sf-lug mailing list