[NBLUG/talk] Moving permissions

Kyle Rankin kyle at nblug.org
Tue Jan 20 13:59:00 PST 2004


On Tue, Jan 20, 2004 at 01:47:34PM -0800, troy wrote:
> On Tue, Jan 20, 2004 at 01:23:25PM -0800, Dustin Mollo wrote:
> > ...just because you remember *today* what changes you made to a
> > particular config file, doesn't mean you'll remember when you're
> > trying to recover a server with 30 people breathing down your neck
> > wondering when they can get to their data agin.
> > 
> > i tend to make copies of entire directory trees, even though i may not
> > have tweaked every file i'll end up backing using this method.  for
> > example, backing up *all* of /etc may be overkill,
> 
> Not overkill at all!  /etc is generally so small, you may as well grab
> it all.  I actually take it a step further.  For those apps (like qmail
> or apache) that are often set up to store their config information in
> their own directory tree somewhere, I'll add a symlink from /etc just so
> I don't miss it when making a backup.  For the same reason, I might link
> logs or mysql data from /var into /home.  Basically, I try to get the
> system to a state such that the only thing I need to do on a backup is
> grab /home and /etc
> 
> I may have mentioned it before, but I think rdiff-backup is a sweet tool
> for hand-crafted backup scripts, especially for stuff like /etc/ which
> might have incremental changes.  And double especially for weenies like
> myself who aren't clued in to CVS yet.
> 
> -troy
> 

I agree with troy, /etc generally compresses so small, and is so vital when
you happen to have lost it, there's no harm in just making a habit to back
up /etc/ on each of your systems somewhere.

For you debian users, another thing you can do is set up a cron job that
runs the following command some time at night:
dpkg --get-selections | grep '[[:space:]]install$' | grep -v 'deinstall$' |
awk '{print $1}' > /etc/installed.txt

What that does is create a list of all the debs in your system and logs
them to a file, /etc/installed.txt.  Then if the system fails and you need
to restore, a simple 
apt-get update && apt-get install `cat /etc/installed.txt` 
will make sure all of your packages are reinstalled (and the backed-up /etc
will make sure they are all configured the same).

-- 
Kyle Rankin
NBLUG President
The North Bay Linux Users Group
http://nblug.org
IRC: greenfly at irc.freenode.net #nblug 
kyle at nblug.org



More information about the talk mailing list