where's 'dump'?

Jim Gifford jgifford at loki.TSS.PeachNet.EDU
Sun Nov 6 20:42:51 EST 1994


> 
> I looked as best I could, and could not find it..... Does Linux have 'dump',
> or something comparable?  If not, what do people use to do backups (tar?)? 
> I am assuming I would need to use dump or an equivalent if I wanted to add my
> Linux files to the end of Exabyte tapes I use with Sun-Unix dump (i.e., I
> don't know if tar could find archives at the end of dump files).

Here is my solution.  I don't have a tape drive, so I ftp the files
to a HP9000 and use fbackup there to get everything.  be aware that
doing an NFS export to another system for backups is SLOW and on
the HP9000 used for this purpose, NFS caused holes in the backup.

Hope this helps someone.
Jim

---------cut here and put the rest as /var/adm/dump/dump and chmod 740-----

#!/bin/sh
#
# A minimal dump level 0 for Linux.
# (Not really, this just gets certain directories and makes a tar.gz
# of them in a seperate directory so that you can move them to 
# whatever media you wish, whether FTP to another machine with a tape,
# or useing mt and tar/cpio to your own tape.)
#
# Written 1994Nov06 by Jim Gifford in a moment of 
# desperation over getting everything saved.
#
# Totally unsupported software, bugs to /dev/null, 
# fixes to Jim_Gifford at OIT.PeachNet.EDU
#
# set LEVEL to the dump level, currently unused
# set CTAR to the command to create the tar.gz files
# set LTAR to the command to list the tar.gz contents
# set LOGS_DIR to the directory to list output of LTAR
# set DUMP_DIR to the directory to store the tar.gz files
#
LEVEL='0'
CTAR='/bin/tar fcz'
LTAR='/bin/tar ftz'
LOGS_DIR=/dump/logs
MT=/bin/mt
DUMP_DIR=/dump
HOSTNAME=`/bin/hostname`
TAPE_DRIVE=/dev/nst0

# /boot contains some lilo files, and on my machine it has vmlinuz
# /log contains rotated logs from syslog and others, like user additions,
# and system changes.
# my system usually mounts many different media of all types,
# so I have directories under mnt like this:
# /mnt/SysV0 /mnt/SysV1 /mnt/Dos0 /mnt/Dos1 /mnt/LinuxServ ...
# You get the idea.  I make sure that everything is unmounted
# before this is executed, and just get the directory structure.

$CTAR $DUMP_DIR/$HOSTNAME.boot.tar.gz /boot
$CTAR $DUMP_DIR/$HOSTNAME.etc.tar.gz /etc
$CTAR $DUMP_DIR/$HOSTNAME.export.tar.gz /export
$CTAR $DUMP_DIR/$HOSTNAME.home.tar.gz /home
$CTAR $DUMP_DIR/$HOSTNAME.log.tar.gz /log
$CTAR $DUMP_DIR/$HOSTNAME.mnt.tar.gz /mnt
$CTAR $DUMP_DIR/$HOSTNAME.rootshome.tar.gz /root
$CTAR $DUMP_DIR/$HOSTNAME.usr.export.tar.gz /usr/export
$CTAR $DUMP_DIR/$HOSTNAME.usr.local.tar.gz /usr/local
$CTAR $DUMP_DIR/$HOSTNAME.var.adm.tar.gz /var/adm
$CTAR $DUMP_DIR/$HOSTNAME.var.spool.cron.tar.gz /var/spool/cron
$CTAR $DUMP_DIR/$HOSTNAME.var.spool.mail.tar.gz /var/spool/mail

cd $DUMP_DIR
# Now check the tar files.

for i in *.tar.gz
do
$LTAR $i >$LOGS_DIR/$i.log
done

# now provide a timestamp
/bin/date >$LOGS_DIR/TIMESTAMP
mail -s 'Dump0 output' root <<EOF
The level 0 dump as of `date` 
is complete.

please review the logs in $LOGS_DIR.

root
EOF
# that is it.

# you could then put commands for the backup of these files to tape here.
# here is an example of tarring to a tape on the first scsi tape drive.
# /dev/nst0 is the non-rewinding scsi tape drive.
#
# $MT -f $TAPE_DRIVE retension   # retension the tape (does a rewind)
# $MT -f $TAPE_DRIVE eom   # space to end of recorded media
# $CTAR $TAPE_DRIVE $DUMP_DIR    # tar -fcz /dev/nst0 /dump
# $MT -f $TAPE_DRIVE eof   # write an EOF at current position
# $MT -f $TAPE_DRIVE retension   # retension the tape (does a rewind)
#






More information about the Ale mailing list