[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Need advice to Backup Raq2



I'd suggest using dump. It can handle backing up to the remote tape drive directly. It requires a transport helper program (like rsh or ssh).

Below is a copy of the script that I use to backup my servers to a remote drive.

My tapehost is a Solaris box, but it *should* work with a Linux box as well. It expects to connect with ssh to tapehost as backup. You'll need to make an ssh key and add the public portion (identity.pub) to /home/backup/.ssh/authorized_keys file on tapehost.

Check the config variables before you run it. TAPEDEV and FILESYSTEMS may need to be altered. Also, mkdir /var/log/backup.

It will only prompt you for the passphrase for the key once. It holds the key in memory for the entire execution of the script.

-Dave

--------
#!/bin/sh

if [ ! $SSH_AGENT_PID ]; then
  exec ssh-agent -- bash $0
  exit
fi

OPERATOR=backup
TAPEHOST=tapehost
TAPEDEV=/dev/rmt/0cn
RMT=/usr/sbin/rmt
RSH=/usr/bin/ssh
DATE=`date +%y%m%d`
DUMP='/sbin/dump 0auf'
LOGDIR=/var/log/backup
FILESYSTEMS='hda1 hda3 md0'

export RMT RSH

#### config above ####
# backup FILESYSTEMS to the TAPEDEV on TAPEHOST with DUMP as OPERATOR using RSH

ssh-add
echo "Rewinding tape..."
REWIND="mt -f $TAPEDEV rewind"
ssh $OPERATOR@$TAPEHOST $REWIND
for FS in $FILESYSTEMS
do
  $DUMP $OPERATOR@$TAPEHOST:$TAPEDEV /dev/$FS 2>&1 | tee $LOGDIR/$FS.$DATE
done
echo "Rewinding and ejecting tape..."
OFFLINE="mt -f $TAPEDEV offline"
ssh $OPERATOR@$TAPEHOST $OFFLINE
------------


Hi again,

I have a Raq2, and I would like implement a way to backup this automatically
over night.
The RAQ2 doesn't have a tape-drive but I have an other Linux box which has.

I am thinking about using tar and then ftp that file to the other box.

- What do you recommend should be backed up daily? (I thought of ETC & HOME)

Please give me your thoughts,

Kind regards,
Marco


_______________________________________________
cobalt-users mailing list
cobalt-users@xxxxxxxxxxxxxxx
To Subscribe or Unsubscribe, please go to:
http://list.cobalt.com/mailman/listinfo/cobalt-users

--
  David B. Peterson    Metagraphics, Inc.
1023 Corporation Way, Palo Alto, CA  94303
  650-964-4600 x225    FAX: 650-964-9575