Sharing Knowledge | System Admin Articles

Backup / Recover using tape in HP Unix




HP-UX offers various commands  to backup file system,

a] dump / restore command (HFS filesystem only)

b] vxdump / vxrestore (vxfs filesystem only)

c] cpio command

d] fbackup / frecover command

e] dd command

f] tar command

g] make_net_recovery or make_tape_recovery commands


1. Backup /data directory to /dev/rmt/0m (tape drive)

# fbackup -i /data -I index.data -f /dev/rmt/0m


# -I index.data : index.data specifies the name of the on-line index file to be generated. It consists of one line for each file backed up during the session. Each line contains the file size, the volume number on which that file resides, and the file name. If the -I option is omitted, no index file is generated.
# -f /dev/rmt/0m : Specify tape device name
# -e /tmp : Exclude /tmp from backup
# -g /var/adm/fbackupfiles/hporabox11.backup.list.txt : File that contains a list of files / dirs to be included / excluded from the tape backup

Using the normal tape location to do a full backup but exclude /tmp and /cdrom /nfs directories, insert a new tape and enter:
# fbackup -f /dev/rmt/0m -i / -e /tmp -e /cdrom -e /nfs -v

2.To view contents of an fbackup tape

Type the following command:
# frecover -f /dev/rmt/0m -x -N -v

3.To verify the tape backup

# frecover -f /dev/rmt/0m -N


Restore from tape
=================

1.To restore all files and directories from tape, enter:
# frecover -f /dev/rmt/0m -r -v

2.To restore selected files or directories use -i /path option. For example, just restore /home/backuptest directory, enter:
# frecover -f /dev/rmt/0m -x -v -i /home/backuptest
    * -r : Recovery all data from tape
    * -x : Extracted / recover selected files / dires only specified by -i option
    * -i /path/to/file : Recover only this file or directory
    * -v : Verbose output




Labels: HP-UX

My Profile PhotoAbout the Author

I'm Madesh, An UNIX System Admin by Profession. I'm having Expertise in HP-UX and Linux Administration. I have done lot of work on the infrastructure Mgmt side in UNIX system administration, Hardware, Storage (EMC/ HP EVA). I'm blogging since 2010.
Follow Me On Twitter or On Facebook

0 Comments for "Backup / Recover using tape in HP Unix"

What do you think about this Article? Add your Opinion..!

Back To Top