Backing up from Solaris 2.5

Backing up from Solaris 2.5

Post by Juan Ant. Martinez Canova » Fri, 12 Dec 1997 04:00:00



Hello:

I want to back up several dir s located on different slices on a tape. I
read Solaris doc, but I don't find a right solution. Examples are how-to
backup A dir from A slice on a tape, and I would like to know...

How-to backup from /var & /etc from a slice and /export from another one
on the same tape...

How-to read tape after back-up to know if it's the right one (before to
recover).

How-to restore A selective dir from multiple dump tape.

Thanks on advance

 
 
 

Backing up from Solaris 2.5

Post by Timothy J. L » Fri, 12 Dec 1997 04:00:00



|How-to backup from /var & /etc from a slice and /export from another one
|on the same tape...

To put multiple things (dumps, tars, etc.) on the tape, use the
no-rewind device names and use the mt command to position the tape.

--
------------------------------------------------------------------------

Unsolicited bulk or commercial email is not welcome.             netcom.com
No warranty of any kind is provided with this message.

 
 
 

Backing up from Solaris 2.5

Post by Daniel Jam » Sat, 13 Dec 1997 04:00:00



 spake to us, saying:

>Hello:

>I want to back up several dir s located on different slices on a tape. I
>read Solaris doc, but I don't find a right solution. Examples are how-to
>backup A dir from A slice on a tape, and I would like to know...

>How-to backup from /var & /etc from a slice and /export from another one
>on the same tape...

>How-to read tape after back-up to know if it's the right one (before to
>recover).

>How-to restore A selective dir from multiple dump tape.

>Thanks on advance


Juan,

Your welcome to use this:

-------------------------------------------------------------------------------
!/bin/ksh

#
# Multi volume backup to single tape (such as 8MM Sun X6212A) using ufsdump.
#

if [ $# -ne 3 ]
then
  exit 0
else

   level=$1
   tapepos=$2  # Suggest you should always start with 1
   logfile=$3

  df -F ufs | grep dsk | awk '{print $1}' | while read fsparms
   do
    mountpoint=`echo $fsparms | cut -d" " -f1`
    device=`echo $fsparms | cut -d" " -f2`
    echo "Backing up $mountpoint ($device)" >> $logfile
    /usr/sbin/ufsdump "$level"unbdsf 126 54000 13000 /dev/rmt/0hn $device  2>> $logfile
   if [ "$?" -gt 0 ]
   then
    echo "Level $level dump of $mountpoint on $device was NOT successful at tape position $tapepos" >> $logfile
   else
     echo "Level $level dump of $mountpoint on $device was successful at tape position $tapepos" >> $logfile
     tapepos=`expr $tapepos + 1`
     echo $tapepos > /etc/last_tape_position
   fi
  done
fi

-------------------------------------------------------------------------------

The above script will backup all "ufs" file systems.  Run it like:

do_backup 0 1 backup.log

If you had partitions /, /usr, /var, and /home. / would be position 1, /usr
position 2, and so on. To restore from the /home sequences (4) use the command:

ufsrestore ivfs /dev/rmt/0 4

If you only wanted to do a selected list, it can be done from the command line
or place them in a file and execute it, like:

/usr/sbin/ufsdump 0unbdsf 126 54000 13000 /dev/rmt/0hn / ; \
/usr/sbin/ufsdump 0unbdsf 126 54000 13000 /dev/rmt/0hn /usr ; \
/usr/sbin/ufsdump 0unbdsf 126 54000 13000 /dev/rmt/0h /var ; \

to restore from /usr you would:

ufsrestore ivfs /dev/rmt/0 2

See:

man ufsdump
man ufsrestore
man mt

for further detail.

--
                  ________________________________________________
                 | \*/\*/*\ http://home.swbell.net/astac /*\/*\*\ |
                 |================================================| ---
           I---, |-=| Daniel James |=- Linux/Unix/Freedom Bigot -=|  ----
      -----U ==| |================================================|   ---

  ----'----U   | |________________________________________________|   ---
 |)___()  'U   |______====____   \________________________________|  -----
[_/,-,\"--"----- // ,-,  ,-,\\\   |/         //,-,  ,-,  ,-,\\ __#  ---    
  ( 0 )====#####// ( 0 )( 0 )''-  o          '( 0 )( 0 )( 0 )''    
---'-'--------------'-'--'-'-------------------'-'--'-'--'-'--------------

 
 
 

Backing up from Solaris 2.5

Post by K Dharmapri » Sat, 13 Dec 1997 04:00:00


Hi

This I worte for a friend of mine. For incremental backups, neads some
miner edditing and hope you can do. Otherwise let me know.


|>>Hello:
|>>
|>>I want to back up several dir s located on different slices on a tape. I
|>>read Solaris doc, but I don't find a right solution. Examples are how-to
|>>backup A dir from A slice on a tape, and I would like to know...
|>>
|>>How-to backup from /var & /etc from a slice and /export from another one
|>>on the same tape...
|>>
|>>How-to read tape after back-up to know if it's the right one (before to
|>>recover).
|>>
|>>How-to restore A selective dir from multiple dump tape.
|>>
|>>Thanks on advance

KD


 
 
 

Backing up from Solaris 2.5

Post by K Dharmapri » Sat, 13 Dec 1997 04:00:00


begin 644 full_backup
<encoded_portion_removed>
end