Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


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

Backup software



>Executing the following did not access the tape device.

# dd if=/dev/nht0 | cat > tapevol.tgz
61433+0 records in
61432+0 records out

[root at kelly-rand tape3]# ls
total 30756

-rw-r--r--    1 root     root     31453696 Dec 16 21:57
tapevol.tgz

# mv tapevol.tgz tapevol

]# head tapevol
 with link time reference (no version symbols)]
' [ (lazy)


relocation processing: cannot make segment writable for
relocation' has different size in shared object, consider
re-linking
: Symbol `<program name unknown>: profiler found no PLTREL
in object : profiler out of memory shadowing PLTREL of can't
restore segment prot after relocDST not allowed in SUID/SGID
programsempty dynamics string token substitution' because of
empty dynamic string token substitution
cannot load auxiliary `
 requested by file=load auxiliary object=load filtered
object=cannot allocate dependency listcannot allocate symbol
search listcannot load shared object fileout of
memoryDYNAMIC LINKER BUG!!!
: : error while loading shared libraries: <program name
unknown>

>Is the above error mssg relevant ?

This is the backup script as I used it.
$TAPE is local to this script, I could make it an
environment variable but why bother at this stage? /dev/nht0
is one and the same.
###############################
#!/bin/bash
# backup

append() # append item to backup list table
{
    n=${#blist[*]}
    blist[$n]=$1
}

# Backup table
#
#     host    platform  filesystem   levels
(Full/Incremental MTWTF)
# append 'loki       LinuxTar /mnt/windows/gbb  I I I F I'
#####################
# append 'raijin     Linux    /dev/hda1   I I I F I'
#####################
append 'localhost       LocalTar /etc     F I I I I'
append 'localhost       LocalTar /var          F I I I I'
append 'localhost       LocalTar /usr/local  F I I I I'
append 'localhost       LocalTar /home/Dad  F I I I I'
#####################

# Using 'dd' to write the tape avoids requiring .rhosts on
artemis (owner
# of the tape drive) giving access to root from the other
systems.  If
# the command were of the form 'rsh <remothost> dump f
artemis:/dev/rst0',
# artemis would need to give root rsh privileges to
<remotehost>.  Not doing
# this avoids giving system wide superuser privileges to
people with Unix
# machines on their desks, while allowing those same people
to have
# superuser privileges for the machines on their desks.
#

TAPEDEV=/dev/nht0
WRT_TAPE="dd of=$TAPEDEV obs=126b"

error_exit()
{
    echo "The nightly backup failed" | mail -s "backup
failed" backuplist
    mt -f $TAPEDEV rewoffl
    exit
}

dump_host() # args: host platform filesystem levels
day_of_week
{
    echo '####################'
    date
    # first test if we can access remote host
    # rsh -n $1 echo
    # if [ $? != 0 ] ; then
    #    echo "rsh to $1 failed" | mail -s "backup failed"
backuplist
    # return
    #  fi

    day=$(($9 + 2))
    level=${!day} # evaluate $day'th positional argument

    if [ $level = F ] ; then
 dl=0
 echo File $fileno: Full backup of $3 on $1
    else
 dl=5
 echo File $fileno: Incremental backup of $3 on $1
    fi

    case $2 in
 SunOS)   rsh -n $1 /etc/dump ${dl}uf - $3 | $WRT_TAPE ;;
 Solaris)  rsh -n $1 /usr/sbin/ufsdump ${dl}uf - $3 |
$WRT_TAPE ;;
 Linux)   rsh -n $1 /sbin/dump ${dl}uf - $3 | $WRT_TAPE ;;
 LinuxTar) if [ $level = F ] ; then
      rsh -n $1 tar zcf - $3 | $WRT_TAPE
    else
      rsh -n $1 tar zcf - -N \"7 days ago\" $3 | $WRT_TAPE
    fi ;;
 LocalTar) if [ $level = F ] ; then
     tar zcf - $3 | $WRT_TAPE
    else
     tar zcf - -N \"7 days ago\" $3 | $WRT_TAPE
    fi;;
    esac

    if [ $? != 0 ] ; then error_exit ; fi

    fileno=$(($fileno + 1))
}

date
mt -f $TAPEDEV rewind
if [ $? != 0 ] ; then error_exit; fi

#
set -v
# cd /root/backup

# Put a copy of the backup scripts on the tape as File 0
# tar cvf $TAPEDEV backup pc.backup
# if [ $? != 0 ] ; then error_exit; fi

# Determine backup level for today.  Get the day of the
week, and
# add in the offset to the backup level arguments.  The
crontab entries
# run backups starting at midnight, Monday night - Friday
night, so
# the day of week numbers will be 2-6.  The level arguments
start at $4.

if [ $# -eq 1 ] ; then
    case $1 in
 Mon)    day_of_week=2 ;;
 Tue)    day_of_week=3 ;;
 Wed)    day_of_week=4 ;;
 Thu)    day_of_week=5 ;;
 Fri)    day_of_week=6 ;;
 *)  echo use day of week in lowercase
     exit ;;
    esac
else
    day_of_week=$((`date +%w`))
    if [ $day_of_week -lt 2 ] ; then day_of_week=2 ; fi
    if [ $day_of_week -gt 6 ] ; then day_of_week=6 ; fi
fi

# Main loop.  Execute the backup for each host entry.
fileno=1
i=0
while [ $i -lt ${#blist[*]} ] ; do

    dump_host ${blist[$i]} $day_of_week

    i=$(($i + 1))
done

date
echo File $fileno - 'M$-win units'
#/root/backup/pc.backup $fileno

mt -f $TAPEDEV rewoffl

#End of backup script
###############################

Jim Kelly-Rand





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org