Backup and recovery


Published on

This is about backup and recovery of HP unix.......

Published in: Education, Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Backup and recovery

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