TAR (Tape archive in unix)
Case scenario ( archive compress backup) 1) check contents to backup % cd /intf/cibs/rezone/S0124 % % ls -ltr total 10 -rw-rw-r-1 bpsi02 sapsys -rw-rw-r-1 bpsi02 sapsys -rw-rw-r-1 bpsi02 sapsys -rw-rw-r-1 bpsi02 sapsys -rw-rw-r-1 bpsi02 sapsys -rw-rw-r-1 bpsi02 sapsys -rw-rw-r-1 bpsi02 sapsys
1482 285 0 0 171 171 0
Apr Apr Apr Apr Apr Apr May
17 17 17 20 20 20 02
2006 2006 2006 2006 2006 2006 2006
TEST170406.TXT TEST170402.TXT TRY1 170403.TXT 200406.TXT 20042006TEST.TXT TEST
2) create archive note : all the contents to backup will be archive in test.tar % a a a a a a a a
tar cvf /tmp/test.tar /intf/cibs/rezone/S0124 /intf/cibs/rezone/S0124 /intf/cibs/rezone/S0124/TEST170406.TXT 3 blocks. /intf/cibs/rezone/S0124/TEST170402.TXT 1 blocks. /intf/cibs/rezone/S0124/170403.TXT 0 blocks. /intf/cibs/rezone/S0124/TRY1 0 blocks. /intf/cibs/rezone/S0124/200406.TXT 1 blocks. /intf/cibs/rezone/S0124/20042006TEST.TXT 1 blocks. /intf/cibs/rezone/S0124/TEST 0 blocks.
3) Archive created % cd /tmp % ls -ltr *.tar -rw-rw-r--
1 ctmagent ctmgroup
10240 May 24 13:15 test.tar
4) Check content of the archive % tar tvf /tmp/test.tar drwxrwxr-x 207 212 0 -rw-rw-r-- 245 201 1482 -rw-rw-r-- 245 201 285 -rw-rw-r-- 245 201 0 -rw-rw-r-- 245 201 0 -rw-rw-r-- 245 201 171 -rw-rw-r-- 245 201 171 -rw-rw-r-- 245 201 0
May Apr Apr Apr Apr Apr Apr May
02 17 17 20 17 20 20 02
11:35:38 10:25:50 11:10:04 16:10:36 16:44:29 16:22:36 16:50:20 11:35:38
2006 2006 2006 2006 2006 2006 2006 2006
/intf/cibs/rezone/S0124/ /intf/cibs/rezone/S0124/TEST170406.TXT /intf/cibs/rezone/S0124/TEST170402.TXT /intf/cibs/rezone/S0124/170403.TXT /intf/cibs/rezone/S0124/TRY1 /intf/cibs/rezone/S0124/200406.TXT /intf/cibs/rezone/S0124/20042006TEST.TXT /intf/cibs/rezone/S0124/TEST
5) Compress archive % compress /tmp/test.tar
6) New compress archive created % cd /tmp % ls -ltr *.Z -rw-rw-r--
1 ctmagent ctmgroup
7) Backup to tape % tar cvf /dev/rmt0 /tmp/test.tar.Z
8) Check backup content in tape % tar tvf /dev/rmt0
1666 May 24 13:15 test.tar.Z
Case scenario (to check tape status) % mt -f /dev/rmt0 status rmt0 Available 3A-08-00-6,0 SCSI 4mm Tape Drive attribute value description
user_settable
block_size compress density_set_1 density_set_2 extfm mode ret ret_error size_in_mb
True True True True True True True True False
1024 yes 38 37 yes yes no yes 20480
BLOCK size (0=variable length) Use data COMPRESSION DENSITY setting #1 DENSITY setting #2 Use EXTENDED file marks Use DEVICE BUFFERS during writes RETENSION on tape change or reset RETURN error on tape change or reset Size in Megabytes