Operating System - HP-UX
1834178 Members
2877 Online
110064 Solutions
New Discussion

Backup Procedure, Full and Intermidiate backup

 

Backup Procedure, Full and Intermidiate backup

Hi Gurus....
I'm quit new to HP-Ux system.
I need info regarding the backup procedure since the server never get a hot or cold backup. Can u guide me or attach related document on backup procedure.

As far as i know, i want to take a full backupup which is make_tape_recovery.
As far as i know, it only covers vg00. How about the other vg?
$make_tape_recovery -A

Below is the bdf command. I need a full backup and procedure to do the backup.
# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 204800 141856 62832 69% /
/dev/vg00/lvol1 298928 153008 116024 57% /stand
/dev/vg00/lvol8 4710400 874752 3812472 19% /var
/dev/vg00/lvol7 2244608 1306984 930320 58% /usr
/dev/vg00/lvol4 204800 37640 166064 18% /tmp
/dev/vg00/lvol6 2727936 2418512 307048 89% /opt
/dev/vg00/lvol5 24576 2336 22072 10% /home
/dev/vg02/lvol1 46080000 28569472 17373784 62% /cramerdb
/dev/vg01/lvol2 16384000 10229190 5975568 63% /cramerapps
#
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor

Re: Backup Procedure, Full and Intermidiate backup

Make_tape_recovery is really only intended for vg00 which should be the OS and the standard applications (ie, those supplied by HP and/or installed with swinstall) and nothing else. This backup is really for the recovery of the OS. The other VG's and vg00 should be backed up using traditional backup tools like tar, cpio, or fbackup/frecover. Fbackup/frecover is, by far, the best of the free tools for HP-UX. It will handle large files, full and incremental backups, and is fast. Man fbackup/frecover for details.

As for hold vs. cold backup, that is determined by your applications. If the applications must be shutdown then a so-called "cold" backup is needed; if not, then you simply start the backup and the application can be put in some sort ot backup mode so that recovery to a sane state is possible. You can also consider, stopping the application, creating a vxfs snapshot of the relavent filesystems, and restart the application. You then backup the snapshots while the application runs.

If you really care about backups (and you should) then you should really look at a commercial product like Data Protector. This can enable you to completely automate your backups and do "point-and-click" restores without ever having to look for tapes.

The subject of backup and recovery is much too system/application specific to be addressed well in a forum like this.
If it ain't broke, I can fix that.
Joel Girot
Trusted Contributor

Re: Backup Procedure, Full and Intermidiate backup

Hi,
fbackup / frecover is the hpux tools for files backup. here a adaptation of my scripts for full and incremental backup on tape (hpux 11.11). Replace /dev/rmt/c0t1d0BEST by your tape device. A folder /var/adm/fbackupfiles must be created before fbackup (for file dates managed by fbackup for incrementals backup)
man frecover and fbackup for details.
for system backup/recovery use make_tape_recovery : /opt/ignite/bin/make_tape_recovery -I -v -x inc_entire=vg00 -a /dev/rmt/0mn
man make_tape_recovery

#! /usr/bin/ksh -x
# full backup
# ===========
echo "\nStart fullbackup $(date)"

echo "i /" > /tmp/fbackup_total

# list of saved files
export Ifile=/tmp/fbackup_0_$(date +%y%m%d)_$(date +%H%M).lst
set +e
/usr/sbin/fbackup -f /dev/rmt/c0t1d0BEST -0 -u -g/tmp/fbackup_total -I$Ifile 1>/tmp/fbackup.msg 2>&1
code=$?
cat /tmp/fbackup.msg
set +x

# handle return code
if (( $code == 0 )) ; then
echo "fbackup good ended"
elif (( $code == 4 )) ; then
echo "fbackup ended with warnings"
else
echo "fbackup error"
echo "fbackup failed on $(hostname). see /tmp/fbackup.msg" | mail root
exit $code
fi

echo "End fullbackup $(date)"


#! /usr/bin/ksh -x
# partial backup, changes since level 0.
# ===================================================
echo "\nStart partbackup $(date)"

echo "i /" > /tmp/fbackup_total

# list of saved files
export Ifile=/tmp/fbackup_1_$(date +%y%m%d)_$(date +%H%M).lst
set +e
/usr/sbin/fbackup -f /dev/rmt/c0t1d0BEST -1 -u -g/tmp/fbackup_total -I$Ifile 1>/tmp/fbackup.msg 2>&1
code=$?
cat /tmp/fbackup.msg
set +x

# handle return code
if (( $code == 0 )) ; then
echo "fbackup good ended"
elif (( $code == 4 )) ; then
echo "fbackup ended with warnings"
else
echo "fbackup error"
echo "fbackup failed on $(hostname). see /tmp/fbackup.msg" | mail root
exit $code
fi

echo "End partbackup $(date)"

Joel