Post on 10-Jun-2015
description
BACKUP AND RECOVERY OF UNIX
Presented By,
S.Duraimurugan.
Contents
What is Backup? Why we need backup? Types of Backup Backup Levels Methods of Backup and Restore
What is Backup? An operation or procedure that
copies data to an alternative location, so it can be recovered if deleted or becomes corrupted.
Why we need backup? To recover the data if we loss that
data..
Types of Backup
Full Backup Incremental backup
Full Backup
A full backup does not mean a backup of every file on our system.
It means a backup of every file on our “include list”.
Incremental Backup
The method of taking a partial backup is called as Incremental Backup.
An incremental backup is a partial system backup where only those files are backed up that have been modified or created since the last backup.
Backup Levels
In HP-UX, 0 to 9 levels are there.
Backup taken at level 0 is always a full backup.
If we cannot specify any backup level in command mode, it takes full backup.
Methods of Backup and Restore HP-UX supports many methods to
Backup and Restore The data backed up with one method
cannot be restored with another method.
Common Methods
fbackup/frecover tar cpio dump/restore vxdump/vxrestore pax dd cp
fbackup
It supports only in HP-UX
#fbackup –v –f /dev/rmt/0m –i /etc
Here copy of /etc can store in /dev/rmt/0m device.
Graph file
Graph files are text files that contains a list of directories.
Example: #cat gfile
i /etc i /home e /etc/lp
#
fbackup by using graph file
#fbackup –v –g gfile -f /dev/rmt/0m
It can backup the all files and directories which are included in graph file
frecover
The frecover command is used to restore a backup.
while restoring, it compares files that already exist on the system and restores only those files that are needed
# frecover –x –v –f /dev/rmt/0m –g gfile
tar
It supports in all unix flavoures The same command is used for both
backup and restore purposses It doesn’t support for backup when the
backup files are more than 2Gb
Backup using tar: #tar –cvf /dev/rmt/0m /etc/home
-c option is used when creating a backup
#tar –cvf /extra/home.tar /home
We can also create tar backup file on another file system instead of on a tape device.
Restore using tar: To restore data from a tar backup,
we use –x option with the tar command..
#tar –xvf /dev/rmt/0m
dd command
dd command is used to Copy a file, converting and formatting according to the options
dd if=/dev/dsk/source-disk bs=1024 of=/dev/dsk/destination-disk
cpio command:
Copy input/output It is a dependent command. It can support multiple volumes backup. We can take huge amount of file system
also Cpio must be used with any command
-i (copy in) cpio -i extracts files from the standard input.
-o (copy out) cpio -o reads the standard input to obtain a list of path names and copies those files onto the standard output.
-p (pass) cpio -p reads the standard input to obtain a list of path names of files.
#ls | cpio –ocv > /dev/rmt/0m Here cpio command copy those files listed
to the drive.
#cpio -icuvd < /dev/rmt/0m It would restore the files back from the
device
dump command
dump command copies the data to tape drive.
It supports only High Performance File System
#dump 0df 6250 /dev/rmt/c0t0d0 /rmt
restore command
To restore files or file systems from backups made with dump
The restore command performs the inverse function of dump
#restore rf /dev/rmt/c0t0d0
pax command
Short for portable archive interchange The pax command reads, writes, and
writes lists of the members of archive files and copy directory hierarchies.
# pax -w -f /dev/rmt/0m . # pax -r -f /dev/rmt/0m .
THANK YOU