The UNIX Forums  

Go Back   The UNIX Forums > OS Specific Forums > BSD
Google UNIX.COM
Home Forums Register Rules & FAQ Members List Arcade Search Today's Posts Mark Forums Read


BSD BSD, sometimes called Berkeley Unix, is a Unix operating system developed by the Computer Systems Research Group of the UC Berkeley.


Other UNIX.COM Threads You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Tape drives used for taking backups forumsrahul Filesystems, Disks and Memory 1 05-14-2008 05:04 AM
Scalar i500 can see tape drives but not autochanger tecky UNIX for Advanced & Expert Users 1 04-04-2008 09:16 AM
command to display my tape drives (rmt's) jwholey AIX 8 03-25-2008 10:52 AM
identifying Tape drives on Sun Servers vivek_scv SUN Solaris 2 04-16-2005 11:49 AM
DDS Tape Drives Skywlkr235 UNIX for Dummies Questions & Answers 0 03-17-2004 07:35 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-06-2007
Registered User
 

Join Date: Aug 2007
Posts: 7
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
tape drives vs. tar with multiple directories

Hello,

I have a little problem with backup & restoring files from tape drive.

I am adding 3 directories to my tape, and it is OK:

hades# tar -cvf /dev/nsa0 test test1 restore
a test
a test/level1
a test/myharddisk.img
a test1
a test1/level1
a test1/myharddisk.img
a test1/test.img
a restore
a restore/.cshrc
a restore/.mail_aliases
a restore/.login
a restore/.rhosts
a restore/.login_conf
a restore/.mailrc
a restore/.profile
a restore/.shrc
a restore/myharddisk.img
a restore/test
a restore/tarlist
a restore/test1
a restore/terlist
a restore/tapefilelist
a restore/test1/level1
a restore/test1/myharddisk.img
a restore/test1/test.img
a restore/test/level1
a restore/test/myharddisk.img

When I am checking tape I see only 1st directory:

hades# tar -tvf /dev/nsa0
drwxr-xr-x 0 root peter 0 Dec 5 18:05 test
drwxr-xr-x 0 root peter 0 Dec 5 18:04 test/level1
-rw-r--r-- 0 root peter 10000000 Dec 5 18:05 test/myharddisk.img

Backup contents of tape and I am a little supprissed.

hades# tar -xvf /dev/nsa0
x test
x test/level1
x test/myharddisk.img
hades# ls -l
total 2
drwxr-xr-x 3 root peter 512 Dec 5 18:05 test
hades#

1. Do you have any idea what is wrong?
2. How to check structure of files added to tape drive using tar?
When I am using
tar -tvf /dev/nsa0
I always see the first directory.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 12-06-2007
Registered User
 

Join Date: Aug 2007
Posts: 7
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
cd

Small update:

I changed tape to the new one, once probe more:


hades# tar -cvf /dev/nsa0 restore/ test1/ test/
a restore
a restore/.cshrc
a restore/.mail_aliases
a restore/.login
a restore/.rhosts
a restore/.login_conf
a restore/.mailrc
a restore/.profile
a restore/.shrc
a restore/myharddisk.img
a restore/test
a restore/tarlist
a restore/test1
a restore/terlist
a restore/tapefilelist
a restore/test1/level1
a restore/test1/myharddisk.img
a restore/test1/test.img
a restore/test/level1
a restore/test/myharddisk.img
a test1
a test1/level1
a test1/myharddisk.img
a test1/test.img
a test
a test/level1
a test/myharddisk.img

As I understand all directories above have been added to tape:

hades# mt -f /dev/nsa0 status
Mode Density Blocksize bpi Compression
Current: 0x44 variable 0 0x1
---------available modes---------
0: 0x44 variable 0 0x1
1: 0x44 variable 0 0x1
2: 0x44 variable 0 0x1
3: 0x44 variable 0 0x1
---------------------------------
Current Driver State: at rest.
---------------------------------
File Number: 1 Record Number: 0 Residual Count 0



hades# tar -tvf /dev/nsa0
tar: Error opening archive: Empty input file: Inappropriate file type or format
hades# mt -f /dev/nsa0 rewind
hades# mt -f /dev/nsa0 status
Mode Density Blocksize bpi Compression
Current: 0x44 variable 0 0x1
---------available modes---------
0: 0x44 variable 0 0x1
1: 0x44 variable 0 0x1
2: 0x44 variable 0 0x1
3: 0x44 variable 0 0x1
---------------------------------
Current Driver State: at rest.
---------------------------------
File Number: 0 Record Number: 0 Residual Count 0

Here I have as last time the same situation, only first directory I am able to see. hmmm...strange...

hades# tar -tvf /dev/nsa0
drwxr-xr-x 0 root peter 0 Dec 5 19:49 restore
-rw-r--r-- 0 peter peter 767 Dec 3 21:51 restore/.cshrc
-rw------- 0 peter peter 373 Dec 3 21:51 restore/.mail_aliases
-rw-r--r-- 0 peter peter 248 Dec 3 21:51 restore/.login
-rw------- 0 peter peter 276 Dec 3 21:51 restore/.rhosts
-rw-r--r-- 0 peter peter 158 Dec 3 21:51 restore/.login_conf
-rw-r--r-- 0 peter peter 331 Dec 3 21:51 restore/.mailrc
-rw-r--r-- 0 peter peter 797 Dec 3 21:51 restore/.profile
-rw-r--r-- 0 peter peter 975 Dec 3 21:51 restore/.shrc
-rw-r--r-- 0 root peter 100000 Dec 5 18:02 restore/myharddisk.img


hades# mkdir new
hades# cd new/

Let try to restore tape...

hades# tar -xvf /dev/nsa0
hades# ls -l
total 0
hades# mt -f /dev/nsa0 status
Mode Density Blocksize bpi Compression
Current: 0x44 variable 0 0x1
---------available modes---------
0: 0x44 variable 0 0x1
1: 0x44 variable 0 0x1
2: 0x44 variable 0 0x1
3: 0x44 variable 0 0x1
---------------------------------
Current Driver State: at rest.
---------------------------------
File Number: 0 Record Number: 11 Residual Count 0
hades# mt -f /dev/nsa0 rewind
hades# mt -f /dev/nsa0 status
Mode Density Blocksize bpi Compression
Current: 0x44 variable 0 0x1
---------available modes---------
0: 0x44 variable 0 0x1
1: 0x44 variable 0 0x1
2: 0x44 variable 0 0x1
3: 0x44 variable 0 0x1
---------------------------------
Current Driver State: at rest.
---------------------------------
File Number: 0 Record Number: 0 Residual Count 0

And this is really interested:

hades# tar -xvf /dev/nsa0
x restore
x restore/.cshrc
x restore/.mail_aliases
x restore/.login
x restore/.rhosts
x restore/.login_conf
x restore/.mailrc
x restore/.profile
x restore/.shrc
x restore/myharddisk.img
x restore/test
x restore/tarlist
x restore/test1
x restore/terlist
x restore/tapefilelist
x restore/test1/level1
x restore/test1/myharddisk.img
x restore/test1/test.img
x restore/test/level1
x restore/test/myharddisk.img
x test1
x test1/level1
x test1/myharddisk.img
x test1/test.img
x test
x test/level1
x test/myharddisk.img
hades# ls -l
total 6
drwxr-xr-x 4 root peter 512 Dec 5 19:49 restore
drwxr-xr-x 3 root peter 512 Dec 5 18:05 test
drwxr-xr-x 3 root peter 512 Dec 5 19:43 test1
hades#

So it means that in reality I had on the tape all my directories, maybe on the first I had problem as I make a lot of tests on one tape drive.

So question now is: how to check using tar the all structure of tape drive if we know that it files has been recorded via tar?
Reply With Quote
Google UNIX.COM
Reply



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 10:51 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
UNIX Forum Content Copyright ©1993-2008 SilkRoad Asia All Rights Reserved -Ad Management by RedTyger

Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102