backup and recovery

24
BACKUP AND RECOVERY OF UNIX Presented By, S.Duraimurugan.

Upload: duraimurugan89

Post on 10-Jun-2015

727 views

Category:

Education


4 download

DESCRIPTION

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

TRANSCRIPT

Page 1: Backup and recovery

BACKUP AND RECOVERY OF UNIX

Presented By,

S.Duraimurugan.

Page 2: Backup and recovery

Contents

What is Backup? Why we need backup? Types of Backup Backup Levels Methods of Backup and Restore

Page 3: Backup and recovery

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

Types of Backup

Full Backup Incremental backup

Page 5: Backup and recovery

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

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

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

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

Common Methods

fbackup/frecover tar cpio dump/restore vxdump/vxrestore pax dd cp

Page 10: Backup and recovery

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

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

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

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

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

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

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

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

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

-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

#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

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

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

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

THANK YOU