full system backup

hi there,i am so new to system administration. using ufsdump command, what file shud i backup? what is the proper command to use?please help and advise.thanks.
[187 byte] By [SunOSnewbiea] at [2007-11-27 9:43:48]
# 1
Have you reviewed the contents of the man pages?
rukbata at 2007-7-12 23:49:38 > top of Java-index,General,Maintenance...
# 2

I'm sure there are other scripts on bigadmin, here's one I mucked up back in 2003 - using mtx for the library handler -

if you have vxfs filesystems, you'll have to muck with it some more. Its nothing special, but it's a place to start - jeff

#!/bin/ksh

#

# Variables

#

LOG=/var/tmp/prbkup.log

PATH=/usr/sbin:/usr/bin:$PATH

todays_date=`/scripts/getday`

export PATH LOG todays_date

/usr/local/mtx/sbin/mtx -f /dev/rmt/1n load ${todays_date} |tee -a $LOG

sleep 10

# Rewind the tape to BOT

mt -f /dev/rmt/1n rewind

date > $LOG 2>&1

#Backup 9 filesystems

# build the list dynamically

echo "about to backup the system:" >> $LOG

df -k -F ufs >> $LOG

echo >> $LOG

for filesystem in `df -k -F ufs|egrep -v "Mounted"|awk '{print $6}'`

do

/usr/sbin/ufsdump 0uf /dev/rmt/1n ${filesystem}>> $LOG 2>&1

done

echo >> $LOG

# Rewind Tape

mt -f /dev/rmt/1n rewind

sleep 5

# Mail the output

mailx -s "Full System Backup on `uname -n`" root < $LOG

/usr/local/mtx/sbin/mtx -f /dev/rmt/1n unload ${todays_date} |tee -a $LOG

jeffrey.sa at 2007-7-12 23:49:38 > top of Java-index,General,Maintenance...
# 3

Dear Jeff,

If I want to manually backup my Solaris server, and the output of the command df -k -F ufs command on my system is like this:

Filesystemkbytesusedavail capacity Mounted on

/dev/md/dsk/d1010187212 6049073 403626760%/

/dev/md/dsk/d3042344610 31916521 1000464377% /f

/dev/md/dsk/d6070572153 13468964 5639746820%/extra

/dev/md/dsk/d40141134915 19767923 119955643 15%/database

/dev/md/dsk/d50141134915 7828962 1318946046%/index

Are these the only file systems I need to backup?

When I create the backup of the root file system, for example, is this command correct?

#ufsdump 0uf /dev/rmt/0 /dev/md/dsk/d10

Thank you!

Cinderella

Cinderella99a at 2007-7-12 23:49:38 > top of Java-index,General,Maintenance...
# 4

If you use device '0', then the tape will rewind after the dump finishes. You'd either have to use a separate tape for each filesystem, forward the tape manually, or you'll end up overwriting the tape with each dump (only the last one would be present at the end).

You may instead want to use the '0n' (or the 0un) device. The 'n' says that the tape should remain in position when the dump is complete.

--

Darren

Darren_Dunhama at 2007-7-12 23:49:38 > top of Java-index,General,Maintenance...
# 5
Hi Darren,Thanks a lot! Cinderella
Cinderella99a at 2007-7-12 23:49:38 > top of Java-index,General,Maintenance...
# 6
thanks jeff. appreciate your quick reply. ?
SunOSnewbiea at 2007-7-12 23:49:38 > top of Java-index,General,Maintenance...