cancel
Showing results for 
Search instead for 
Did you mean: 

How to run "user backup"

CHONG_WU
Level 5
I select "user backup" this backup type , but it doesn't run, how to let it run? I also setup time on the start time window.If I run "manual backup" command, it says that no automatic schedule.
4 REPLIES 4

Andy_Welburn
Level 6

The 'User Backup' type is not the same as a scheduled Full or Incremental backup.

 

The 'User Backup' window basically sets a period of time (the Window) when a backup can be initiated direct from the Client (by the User) via the BAR GUI.

 

From the Admin Guide:

"...

User backup
A user initiates a user backup through the Backup, Archive, and Restore client interface. A user backup backs up all files that the user specifies. Users can start backups only during the times that are allowed on the schedule Start Window tab.

..."

 

If you need to manually run a backup of a client via the Admin Console you will need to set up a Full or Incremental schedule.

Stumpr2
Level 6

Good answer Andy.

Also be advised that users can only backup/restore files that they have read access to.

 

 

Android
Level 6
Partner Accredited Certified
Not sure if this issue has been addressed, and I may be stating the obvious but if you are starting the backup from the client, as a user, then you will also need to make sure you have a user schedule created within your policy. 

zippy
Level 6

a user directed backup is just what it says, a user initiates the backup.

 

all is done from the client server.

 

 

Example script:

 

#!/usr/bin/sh

#set -vx

 

###################################################################

#Jim Dunn 

#Wed Feb 16 14:07:06 EST 2005

###################################################################

 

###################################################################

PATH=$PATH:/opt/Navisphere/bin:/sbin:/usr/admsnap

export PATH

DB=SDP3

DIR=/usr/local/bin/snapview

Catalog=$DIR/catalog.txt_ush19

SrcSrvSH=$DIR/oracle_scripts/prdActivate_${DB}.sh

LOG=$DIR/$DB/SnapActivate_${DB}.log

HOST=ush3

POL=USH3_SDP3_SNAP

Output=$DIR/oracle_scripts/prdDeactivate_${DB}.sh

LOG1=$DIR/$DB/snapDeactivate.out

ORASCR=$DIR/oracle_scripts

SGHOST=sdp3pkg.crapeecompany.com

 

###################################################################

 

> $SrcSrvSH

 

###################################################################

#Following commands will be executed on Production Server

# Backup Volume group information to MAP files to be later transfered to Target server.

###################################################################

 

echo ". /.profile" >$SrcSrvSH

echo "cd "$DIR >>$SrcSrvSH

 

###################################################################

#Should be done manully on the Production server

#The first time the snap is setup

#The *.infile needs to be create on the Backup Target server

#

#awk "/${DB}/"'{print "rm "$3".map}' $Catalog|sort -u>>$SrcSrvSH

###################################################################

 

awk "/${DB}/"'{print "/usr/sbin/vgexport -v -p -s -m "$8".map  "$3}' $Catalog|sort -u>>$SrcSrvSH

 

awk "/${DB}/"'{print "/bin/rcp "$8".map ush3:/usr/local/bin/snapview/SDP3/vgbackups"}' $Catalog|sort -u>>$SrcSrvSH

 

###################################################################

# Begin Oracle Backup mode

# Start Snapsessions

###################################################################

 

echo "su - oracle < /usr/local/bin/snapview/oracle_scripts/starthotbackup_${DB}.sh" >>$SrcSrvSH

 

echo "/usr/sbin/sync" >>$SrcSrvSH

 

awk "/${DB}/"'{print "/usr/admsnap/admsnap start -s "$1 " -o "$2 " -p"}' $Catalog>>$SrcSrvSH

 

###################################################################

# End Oracle backup mode

###################################################################

 

echo "su - oracle < /usr/local/bin/snapview/oracle_scripts/endhotbackup_${DB}.sh" >>$SrcSrvSH

 

rcp $SrcSrvSH $SGHOST:$ORASCR

 

remsh $SGHOST -l root -n  chmod 700 $SrcSrvSH

 

remsh $SGHOST -l root -n  $SrcSrvSH

 

###################################################################

#rcp map files to Target Server to  Backup Server

#rcp $TARGET:$DIR/vg0*.* $DIR/vgbackups

###################################################################

 

###################################################################

#Following commands will be executed on Backup Server

#       - Activate Snapshot

#       - FS Check the mount points

#       - Mount the FileSystems

###################################################################

 

echo "************ Start of SnapActivate_${DB}.sh *******" >$LOG

echo "`date +%x-%X` Building list of commands to be executed on the target server" >>$LOG

echo "`date +%x-%X` Activating SnapShot" >>$LOG

 

 

awk "/${DB}/"'{print "admsnap activate -s "$1 }' $Catalog | /usr/bin/sh >> $LOG

 

 

###################################################################

#THIS HAS TO BE DONE THE FIRST TIME

#/sbin/powermt check dev=all

#/sbin/powermt config 

#/sbin/powermt check 

###################################################################

 

/usr/sbin/ioscan -fn

 

/usr/sbin/insf -e -C disk

 

/sbin/powermt restore dev=all 

 

 

###################################################################

 

awk "/${DB}/"'{print "mkdir /dev/"$8}' $Catalog | /usr/bin/sh

 

awk "/${DB}/"'{print "/usr/sbin/mknod /dev/"$8"/group c 64 0x110000"}' $Catalog | /usr/bin/sh

 

cd $DIR/$DB/vgbackups

 

awk "/${DB}/"'{print "vgimport -v -m "$8".map -f "$8".infile "$8}' $Catalog|sort -u | /usr/bin/sh

 

awk "/${DB}/"'{print "vgchange -c n "$8}' $Catalog|sort -u | /usr/bin/sh

 

awk "/${DB}/"'{print "vgchange -a y "$8}' $Catalog|sort -u | /usr/bin/sh

 

awk "/${DB}/"'{print "mkdir "$7}' $Catalog | /usr/bin/sh

 

awk "/${DB}/"'{print "fsck -F vxfs -y  /dev/"$8"/"$4";sleep 15" }' $Catalog |/usr/bin/sh

 

 

###################################################################

 

awk "/${DB}/"'{print "mount /dev/" $8 "/" $4 " "$7}' $Catalog |/usr/bin/sh

 

sleep 60

 

###################################################################

#We'll Do Full Backups on this Database

#Everyday

#FOR NOW

###################################################################

 

###################################################################

#if [[ $(date "+%a") = "Sat" ]];then

###################################################################

 

   SCHEDULE="Full"

 

###################################################################

#else

#   SCHEDULE="Incr"

#fi

###################################################################

 

/usr/openv/netbackup/bin/bpbackup \

     -s $SCHEDULE \

     -p $POL \

     -h $HOST    \

     -S $HOST    \

     -i          \

     -w 

RC=$?

echo $RC 

    if [ $RC -ne 0 ]

     then

       /usr/bin/mailx -s "${DB} Oracle Hotbackup Failed, Veritas ERROR CODE is $RC" ora_hot  < /dev/null

fi

 

sleep 600

 

awk "/${DB}/"'{print "fuser -k "$7}' $Catalog | /usr/bin/sh

 

LC=$?

echo $LC

    if [ $LC -ne 0 ]

then

        /usr/bin/mailx -s "${DB} mount is still active on $HOST snap will not unmount" ora_hot  < /dev/null

 

exit 69

 

fi

 

###################################################################

 

awk "/${DB}/"'{print "umount "$7}' $Catalog | /usr/bin/sh

 

awk "/${DB}/"'{print "vgchange -a n "$8}' $Catalog|sort -u | /usr/bin/sh

 

awk "/${DB}/"'{print "admsnap deactivate -s "$1 }' $Catalog | /usr/bin/sh

 

 

###################################################################

 

cd $DIR/$DB/vgbackups

 

awk "/${DB}/"'{print "vgexport -v -m "$8".map "$8}' $Catalog | sort -u| /usr/bin/sh

 

###################################################################

 

cd $ORASCR

>$Output

 

echo ". /.profile" >$Output

 

awk "/${DB}/"'{print "/usr/admsnap/admsnap stop -s "$1 " -o "$2}' $Catalog >>$Output

 

rcp $Output $SGHOST:$ORASCR

 

remsh $SGHOST -l root -n chmod 700 $Output

 

remsh $SGHOST -l root -n $Output