tape backup

hi,

I try to take backup in dat drive. When i give the command for backup it says backup is complete. i also see the file status in the tape drive using tar cokmmand. but i run the command 'mt -f /dev/st0 status' it shows 0 file number in the tape. i attached a screenshot of that. please help me to solve the issue.

Re: tape backup

You're using the "/dev/st0" device, which includes the auto-rewind feature.

As soon as your "tar -czf /dev/st0 /tmp/abedin/file" command completes, the tape driver will automatically rewind the tape back to the very beginning of tape (= to position: file number 0, block number 0). This might be useful for some purposes, but it can be very confusing to people not familiar with classic Unix tape devices.

You might want to use the no-auto-rewind device "/dev/nst0" instead in all your tape-related commands.

The file and block numbers are not totals: they are a count of tape files and blocks the drive has seen so far starting from the beginning of the tape. (It would be impossible for the tape drive to know the total number of files on the tape without first reading the whole tape from the beginning to the end. It is generally not possible/not worth the effort to place an updateable "directory" of tape contents to the beginning of tape.)

One "tar -czf ..." session will be just one "tape file", even if it will contain multiple files: as far as the tape drive is concerned, it is a single tar file.