[svlug] What to include in backups (incremental & periodic)

kmself@ix.netcom.com kmself at ix.netcom.com
Wed Aug 2 13:35:01 PDT 2000


On Wed, Aug 02, 2000 at 11:19:58AM -0700, Jasmine Sante wrote:
> Hi all,
> 
> We are setting up a tape backup system, to be run as a cron job for weekly
> "full" backups and 2 or 3 incremental backups during the week.  I'm not
> certain which files to include in the full backup...do I just dump
> everything?  Or are there specific directories that I can leave out?  Some
> that I *must* include?
> 
> Also, I'd only planned on including user files and database dumps in the
> incremental backups.  Are there other things I should include?
> 
> I am running red hat linux 6.0, Apache w/ fairly standard file structures.

My own backup script (/usr/local/sbin/system-backups) which I run weekly
(or weakly).  Note the /var/cache/apt line, which is specific to Debian
-- you may want to include the RedHat equivalent, essentially the RPM
database.

Generally speaking, you're not interested in:

  o /tmp
  o /usr (except for /usr/local)
  o bits and pieces of /var

You absolutely want:

  o /home
  o /etc
  o /usr/local

You probably want:

  o Bits and pieces of /var
  o (probably) /root (which I should add, thinking of it now).
  o (possibly) /boot, 
  o Other local filesystems outside the FSB.

...the philosophy being that you can reconstruct your distribution from
package information (and would probably benefit from an upgrade anyway).
You *can't* recover localized data and  system configurations,  from a
generic image, CD, or net archive. 

Protect what's valuable to you.

It might also make sense to create archives of your disk partitions
(fdisk -l /dev/<your device here>) and related hardware information.

I like tar because of its universal access -- I can retrieve these
archives from any system, anywhere.  Not just Linux, not just Unix.
Other backup/recover tools offer greater functionality, but generally
reduce the flexibility of access.

--------------------< begin system-backup >--------------------
#!/bin/bash

# Create backups of /etc, /home, /usr/local, and...

mt rewind
tar cvf /dev/nst0 /etc
tar cvf /dev/nst0 /home
tar cvf /dev/nst0 /usr/local

# and selected /var directories
tar cvf /dev/nst0 /var/backups
tar cvf /dev/nst0 /var/cache/apt
tar cvf /dev/nst0 /var/lib
tar cvf /dev/nst0 /var/log
tar cvf /dev/nst0 /var/www
--------------------< end system-backup >--------------------

...it would probably also be good to verify the backup after creating
it, and attempt a test restore from time to time.

-- 
Karsten M. Self <kmself at ix.netcom.com>     http://www.netcom.com/~kmself
 Evangelist, Opensales, Inc.                    http://www.opensales.org
  What part of "Gestalt" don't you understand?   Debian GNU/Linux rocks!
   http://gestalt-system.sourceforge.net/    K5: http://www.kuro5hin.org
GPG fingerprint: F932 8B25 5FDD 2528 D595 DC61 3847 889F 55F2 B9B0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://lists.svlug.org/archives/svlug/attachments/20000802/d106164b/attachment.bin


More information about the svlug mailing list