backup and recovery
DESCRIPTION
This is about backup and recovery of HP unix.......TRANSCRIPT
![Page 1: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/1.jpg)
BACKUP AND RECOVERY OF UNIX
Presented By,
S.Duraimurugan.
![Page 2: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/2.jpg)
Contents
What is Backup? Why we need backup? Types of Backup Backup Levels Methods of Backup and Restore
![Page 3: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/3.jpg)
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..
![Page 4: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/4.jpg)
Types of Backup
Full Backup Incremental backup
![Page 5: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/5.jpg)
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”.
![Page 6: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/6.jpg)
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.
![Page 7: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/7.jpg)
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.
![Page 8: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/8.jpg)
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.
![Page 9: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/9.jpg)
Common Methods
fbackup/frecover tar cpio dump/restore vxdump/vxrestore pax dd cp
![Page 10: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/10.jpg)
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.
![Page 11: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/11.jpg)
Graph file
Graph files are text files that contains a list of directories.
Example: #cat gfile
i /etc i /home e /etc/lp
#
![Page 12: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/12.jpg)
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
![Page 13: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/13.jpg)
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
![Page 14: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/14.jpg)
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
![Page 15: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/15.jpg)
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.
![Page 16: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/16.jpg)
Restore using tar: To restore data from a tar backup,
we use –x option with the tar command..
#tar –xvf /dev/rmt/0m
![Page 17: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/17.jpg)
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
![Page 18: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/18.jpg)
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
![Page 19: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/19.jpg)
-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.
![Page 20: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/20.jpg)
#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
![Page 21: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/21.jpg)
dump command
dump command copies the data to tape drive.
It supports only High Performance File System
#dump 0df 6250 /dev/rmt/c0t0d0 /rmt
![Page 22: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/22.jpg)
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
![Page 23: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/23.jpg)
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 .
![Page 24: Backup and recovery](https://reader035.vdocuments.us/reader035/viewer/2022062319/5577b54cd8b42a1c068b4691/html5/thumbnails/24.jpg)
THANK YOU