CPIO: (Copy Input Output):
TAR: There is no Filter
o = It reads the files from system to output library
O= It is used to redirect the data to the required location. i.e. /dev/rmt/0
i = It reads the data from backup tapes to input libray
I = It reads the data from standard output instead of input libray
ex: data transfer rate: 512 Bytes
B = it is a blocking factor which reads 5120 bytes instead of 512 bytes.
CPIO supports only relative backup:
Advantage of CPIO:
1. It supports multiple tapes
2. If any bad sector is found on the tape it will try to eliminates the bad sector.
ex:
# mkdir /jogi
# cd /jogi
# touch j1 j2 j3
# ls
j1 j2 j3
# pwd
/jogi
backup: (directory for relative should in present working)
# ls | cpio -ocvf -O /dev/rmt/0
check the backup:
# cpio -itvf -I /dev/rmt/0
# mkdir /sita
# cd /sita
to restore the backup:
# cpio -icvf -I /dev/rmt/0
note: for backup o,O
for recover: i, I
Some discrete symbols for cpio:
'O' replace with '>'
'I' replace with '<'
to take a backup & restore by using re discrete symbols:
# mkdir /john
# cd /john
# touch l1 l2 l3
# ls
l1 l2 l3
# pwd
# find .| cpio -ocB>/dev/rmt/0
now two copies create & /john
To recover the data:
# mkdir /david
# cd /david
# cpio -icvdB</dev/rmt/0 // d- directory
as of now we have taken whole files of directory
Interactive backup:
It is used to take a backup of a specified files in the directory
ex: # mkdir /ahmed
# cd /ahmed
# touch a1 a2 a4 a5 a3
now i want to take the backup of only two files:
# cpio -oB>/dev/rmt/0
-- type here--
a1
a2
ctrl+D
# mkdir /johny
# cd /johny
to recover (only two files recover now)
# cpio -iB</dev/rmt/0
# ls
a1 a2
assignment:
how to recover a single file from a tape drive, where the tape drive have 10 files?
to copy or back of limited files of 5
l1 l2 l3 l4 l5
# cpio -ocvf -O /dev/rmt/0
l1
l2
ctrl+D
# cpio -iB -I /dev/rmt/0 l1
only l1 file extracted
TAR: There is no Filter
o = It reads the files from system to output library
O= It is used to redirect the data to the required location. i.e. /dev/rmt/0
i = It reads the data from backup tapes to input libray
I = It reads the data from standard output instead of input libray
ex: data transfer rate: 512 Bytes
B = it is a blocking factor which reads 5120 bytes instead of 512 bytes.
CPIO supports only relative backup:
Advantage of CPIO:
1. It supports multiple tapes
2. If any bad sector is found on the tape it will try to eliminates the bad sector.
ex:
# mkdir /jogi
# cd /jogi
# touch j1 j2 j3
# ls
j1 j2 j3
# pwd
/jogi
backup: (directory for relative should in present working)
# ls | cpio -ocvf -O /dev/rmt/0
check the backup:
# cpio -itvf -I /dev/rmt/0
# mkdir /sita
# cd /sita
to restore the backup:
# cpio -icvf -I /dev/rmt/0
note: for backup o,O
for recover: i, I
Some discrete symbols for cpio:
'O' replace with '>'
'I' replace with '<'
to take a backup & restore by using re discrete symbols:
# mkdir /john
# cd /john
# touch l1 l2 l3
# ls
l1 l2 l3
# pwd
# find .| cpio -ocB>/dev/rmt/0
now two copies create & /john
To recover the data:
# mkdir /david
# cd /david
# cpio -icvdB</dev/rmt/0 // d- directory
as of now we have taken whole files of directory
Interactive backup:
It is used to take a backup of a specified files in the directory
ex: # mkdir /ahmed
# cd /ahmed
# touch a1 a2 a4 a5 a3
now i want to take the backup of only two files:
# cpio -oB>/dev/rmt/0
-- type here--
a1
a2
ctrl+D
# mkdir /johny
# cd /johny
to recover (only two files recover now)
# cpio -iB</dev/rmt/0
# ls
a1 a2
assignment:
how to recover a single file from a tape drive, where the tape drive have 10 files?
to copy or back of limited files of 5
l1 l2 l3 l4 l5
# cpio -ocvf -O /dev/rmt/0
l1
l2
ctrl+D
# cpio -iB -I /dev/rmt/0 l1
only l1 file extracted
No comments:
Post a Comment