Root directory filling up...
Nikolas Britton
freebsd at nbritton.org
Tue Dec 14 18:32:13 PST 2004
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,
>x-windows)?
>
>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:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/consoles.html
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/permissions.html
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/disk-organization.html
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/dirstructure.html
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/mount-unmount.html
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/editors.html
http://wks.uts.ohio-state.edu/unix_course/intro-18.html#HEADING18-0
http://wks.uts.ohio-state.edu/unix_course/intro-24.html#HEADING24-0
http://wks.uts.ohio-state.edu/unix_course/intro-32.html#HEADING32-0
http://wks.uts.ohio-state.edu/unix_course/intro-17.html#HEADING17-0
http://wks.uts.ohio-state.edu/unix_course/intro-14.html#HEADING14-0
http://wks.uts.ohio-state.edu/unix_course/intro-67.html#HEADING67-0
http://wks.uts.ohio-state.edu/unix_course/intro-70.html#HEADING70-0
http://wks.uts.ohio-state.edu/unix_course/intro-71.html#HEADING71-0
http://wks.uts.ohio-state.edu/unix_course/intro-74.html#HEADING74-0
http://wks.uts.ohio-state.edu/unix_course/intro-81.html#HEADING81-0
http://wks.uts.ohio-state.edu/unix_course/intro-86.html#HEADING86-0
http://wks.uts.ohio-state.edu/unix_course/intro-137.html#HEADING137-0
More information about the freebsd-newbies
mailing list