[conspire] How do I determine what I need to keep from my internal hard drive and what is the recommend way to move things to an external hard drive

Rick Moen rick at linuxmafia.com
Wed Sep 8 19:06:28 PDT 2010

Darlene, pardon me for being a little inconsistent in my attention to
detail, but of course I'm having to catch up on two weeks of
accumulated... everything.  You said:

> I'm using rsync -avxz to copy:
> bin
> etc
> home
> lib
> opt
> root
> sbin
> sys
> usr
> var
> Just in case.

Yes, 'just in case' -- which sort of makes my point that you're seeking
to compensate for not being sure of what to back up.  Let me show you a
guesstimate (based on my own work system) of what sort of payoff you can
gain from gaining better knowledge:

borgia:/# du -sh /bin
4.1M    /bin
borgia:/# du -sh /sbin
3.5M    /sbin
borgia:/# du -sh /lib
73M     /lib

/bin, /sbin, and /lib are so tiny they're not worth arguing over, but
inherently should contain _nothing_ that's not provided by your distro

/etc, /home, /opt, and /root obviously consist solely of stuff you've
built up locally and should be of great interest for backups -- or, at
least, should contain only such things unless there's something very,
very wrong with your system.

BTW:  Make sure you have a copy of your bootloader configuration file.
I believe Fedora makes sure there's an /etc/grub.conf symlink pointing
to /boot/grub/menu.lst, or something like that, so you're probably
covered if you snapshot /etc, but it's worth double-checking.

The interesting cases are /usr and /var.

borgia:/# du -sh /usr
14G     /usr
borgia:/# du -sh /usr/local
43M     /usr/local

Fourteen _gigabytes_?  Fsck me sideways with a chainsaw.  And that's for
the fairly _sparse_ Debian desktop system in front of me.  I submit that
one should think twice, think three times, before backing up _all_ of
that 'just in case'.  What does it consist of?

/usr consists, speaking broadly[1], of two things:  (1) Your locally
installed files hierarchy, /usr/local.  Which obviously should be backed
up.  (2) Contents of software packages, as installed separated by
function into subtrees for libs, superuser libs, binaries, etc.

There are some occasional gotchas introduced by some software packages'
odd behaviour.  My 'Backup Scheme' file discussed a few, e.g. Apache
httpd's habit of wanting to have system CGIs in /usr/lib/cgi-bin.  It is
unlikely that you use Apache httpd, but the general principle is
what I'm calling your attention to:  The only way to know where the
files are on your system that you've worked on manually and thus care
about is to pay attention to where they are when you work on them.

If I'd done a system backup and omitted /usr entirely on grounds that it
should consist (aside from /usr/local) solely of package-derived files,
I would be unpleasantly surprised when I later discovered that my CGIs
were missing from /usr/lib/cgi-bin.

borgia:/# du -sh /var
458M    /var

Backing up all of /var 'just to be sure' is obviously, at around 1/2 GB,
far less of a debacle than doing that for /usr.  However, again, you
really should spend some time making sure you know what's there.

MySQL likes to store its database files in /var/lib/mysql.  Mailman
likes to put its stuff in /var/lib/mailman.  MTAs often put inbound and
outbound SMTP spools in /var/spool/mail or /var/mail.  None of which you
likely use, but (again), note the principle that applies:  You might
have other oddly-behaving apps.

[1] Detail freaks are welcome to run to the Filesystem Hierarchy
standard and cite the _specifics_ of what's supposed to be in usr, if
that makes them happy.  Ditto for /var.

More information about the conspire mailing list