Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Dec 2004 20:32:10 -0600
From:      Nikolas Britton <>
To:        Kiffin Gish <>
Subject:   Re: Root directory filling up...
Message-ID:  <>
In-Reply-To: <000101c4e215$2cdfedc0$9900000a@ZGISH>
References:  <000101c4e215$2cdfedc0$9900000a@ZGISH>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
Kiffin Gish wrote:

>Wow, that seems like a lot of work. Suppose instead I choose just to
>reinstall everything all over again...
>What stuff do I need to save and restore later so that I don't have to
>reinstall all my applications all over again (Internet, mail, gnome,
>Like the /etc/* , etc. Is there a standard way to do this?

Yes you could save everything in /etc, but most of it you don't need, 
"tar -czf /home/etc.tar /etc"
Save any files you changed in /etc, save rc.conf in /etc, and possibly 
hosts and resolv.conf
Save all your personal data i.g. your "home" and roots directory
if you have custom conf files for programs save them, i.g. samba's conf 
file etc.
if you have custom conf files in /usr/local/etc/ save them
if you have custom scripts in /usr/local/etc/rc.d save them
save your Xorg config file (man xorg.conf)
save /boot/loader.conf
save a copy of the dmesg output... "dmesg >> /home/dmesg"

basically save anything that you have made or edited

I highly recommend starting a log/notes/diary for all this stuff; 
special settings, hard to remember commands, tips/tricks, 
special/complex procedures, advice etc.

if you reinstall everything you'll have to rebuild/install all your 
ports/packages that you installed (you could backup/restore everything 
but that will be just as hard and time consuming)  most of the 
configuration data for these programs (like gnome etc) are stored in 
your home directory so you would restore you home directory to the new 
install to get those settings back.
by the looks of it (/dev/ad0s4d    7.4G    5.9M    6.8G     0%    /home) 
id just tarball and gzip the whole thing.

tar -czf home.tar /home

then move all the saved files/data from you old install (that you backed 
up, off of the hard drive, because your going to wipe it clean again) to 
the new install:

mkdir /tmp/olddata
mv foo /tmp/olddata

then to restore it cd into /usr
and do something like this tar -zxvf /tmp/olddata/home.tar

make sure to recreate everything as much as possible during the new 
install, i.g. make the same users (with the same passwords) on the new 
install etc., postinstall settings like setting up network card etc. and 
installed programs (you can get a complete list of all the programs 
installed using pkg_info, "pkg_info >> /home/pkg_info") if you do this 
then you shouldn't need to restore the files in /etc (unless you made 
special or manual changes to them etc.

you can use diff to check if the files are the same and if there not 
what needs to be add to them, you'd do it kinda like this
diff /tmp/olddata/etc/rc.conf /etc/rc.conf
diff /tmp/olddata/boot/loader.conf /boot/loader.conf

Here is a basic list of all the commands & stuff you should learn before 
starting your adventure, read the man pages ("man foo") for very 
detailed info, most of which you don't need to know or memorize, just 
get familiar with the basics and what each thing does: cd, pwd, su, cp, 
ln, mv, tar, gzip, mkdir, whatis, grep, diff, rm, dmesg, more, ee, echo, 
how and when to use ">", ">>", "|", "*" (pipes, redirectors, and 
wildcards), whatis, how to use the scroll lock key to scroll up/down at 
the console, man, woman, chmod, chown, ls / ll / ls -d foo*, how to 
switch between virtual consoles aka Alt. plus F1 though F8, rc.conf, 
loader.conf, "Metasyntactic variables" i.g. what someone means when they 
say foo or foobar etc., whatis, whereis, find, mount / umount.   
Learning these basic commands will help you in all future expeditions 
into the UNIX system.

!!The two most important commands to master and remember are "whatis" 
and "man"!!

The following links will help you understand all (with the help of the 
man pages and google) of the stuff I'm talking about:

Want to link to this message? Use this URL: <>