Click to See Complete Forum and Search --> : Backing up your configuration...


D-Termind
12-06-2000, 06:36 PM
Is there an easy way to back up your Linux configuration in case you mess up?

Perhaps something like the Adaptec GoBack program for Windows or the Restore Points in Win ME...

http://www.linuxnewbie.org/ubb/confused.gif



------------------

D-Termind
2
Leave
Win-DUHs

fancypiper
12-06-2000, 11:12 PM
The config files are in /etc

I have a separate partitions for /home and /usr/local, so I keep 2 copies of the /etc directory in my home directory, one copy is my current configs and the other copy is the configs before that.

I can even completely re-install and have those handy because I don't format the /home and /usr/local partitions.

------------------
Fancy Piper ""Linux: Viagra for the PC"
The NHF Index (http://www.crosswinds.net/~fancypiper/nhf_index.html) all in 1 page
Command Line Survival (http://www.crosswinds.net/~fancypiper/command_line_survival.html) guide
Fancy Piper (http://naomisfancy.virtualave.net/phil.html)

D-Termind
12-06-2000, 11:37 PM
Originally posted by fancypiper:
The config files are in /etc

I have a separate partitions for /home and /usr/local, so I keep 2 copies of the /etc directory in my home directory, one copy is my current configs and the other copy is the configs before that.

I can even completely re-install and have those handy because I don't format the /home and /usr/local partitions.


I seem to remember some string to compress/archive an entire directory & store it elsewhere, but I forgot how that goes. If you know that handily it'd be great if you posted it.

In the meantime I'll see if I can find it.

Out of curiosity, about how big IS the /etc directory?

I've probably re-installed MDK/LNO 15-20 times in the last few weeks...I think I am beginning to get comfortable with a couple things. http://www.linuxnewbie.org/ubb/eek.gif



------------------

D-Termind
2
Leave
Win-DUHs

Fandelem
12-07-2000, 12:56 PM
If this helps, here's what I use:


#!/bin/bash
DIR="/configfiles"

echo "Copying files to $DIR"
cp /root/.bashrc $DIR
cp /usr/bin/antispoof $DIR
cp /usr/local/etc/proftpd.conf $DIR
cp /etc/ssh/sshd_config $DIR
cp /etc/hosts.allow $DIR
cp /etc/hosts.deny $DIR
cp /usr/local/pmfirewall/pmfirewall $DIR
cp /usr/local/pmfirewall/pmfirewall.conf $DIR
cp /usr/local/pmfirewall/pmfirewall.rules.local $DIR
cp /ijb20/*.ini $DIR
cp /usr/local/squid/etc/squid.conf $DIR
cp /etc/dhcpd.conf $DIR
cp /etc/rc.d/rc.local $DIR
cp /usr/bin/firewall $DIR
cp /etc/rc.d/firewall-extensive $DIR
cp /usr/bin/pppmonitor $DIR
cp /etc/services $DIR
cp /etc/inetd.conf $DIR
cp /etc/issue $DIR
cp /etc/lmhosts $DIR
cp /etc/named.conf $DIR
cp /usr/bin/cleanup $DIR
cp /usr/bin/backupconfig $DIR
cp /usr/local/psionic/portsentry/portsentry.conf $DIR
cp /sw/pkg/apache/conf/httpd.conf $DIR
cp /etc/sqmgrlog.conf $DIR

#Tarring directory
tar -zvvcf $DIR/backup.tgz $DIR

echo "Done."


it's tailored to my system though.. i backupp apache, portsentry, pmfirewall, squid&internetjunkbuster proxies, sshd, dhcpd, inetd, etc.. just run via crontab :}

regards,

~kyle