Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
don't know where to post this, in software or in hardware? Because the questions will have a little bit of both.
Ok, first, let's start with USB TapeDrives. How well are they supported in Linux? Are there any problems, like drivers etc? Or is it better to use standard "build-me-in" tapedrive?
Now onto tar. I've used tar many times...for files, but never on a tapedrive.
How to use it?
tar -x /dev/{tapedrive} files ?
How to append new stuff to the tape?
tar -Ax /dev/{tapedrive} files ?
On man page:
Quote:
-d, --diff, --compare
find differences between archive and file system
What exactly does it meen differences between archive and file system?
Again on man page:
Quote:
--delete
delete from the archive (not for use on mag tapes!)
Does this mean that you can not delete certain files from the tape archive?
Then I'd need to pull out, file by file from the tape, check it with the new version of the file(programatically) and add new differences from the newer file back to the tape archive. How to achieve this?
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197
Rep:
The first thing to get clear on is that a tape drive is a sequential device, not a random access device like a disk drive. What that means is that you write it from beginning to end and read it from beginning to end. You can do things like fast forward and backward to file marks, and you can rewind. But, in particular, when writing to the tape, you write to the end of the data on the tape. If you write to an intermediate point on the tape, then that becomes the end. You have essentially wiped all data beyond that point. So, . . .
While tar refers to tape files and has the ability to manipulate and change those files, it cannot do those things to a file on a tape. You would have to read the file off the tape, manipulate it, and then write it back out to the tape. In so doing you would either append it to the tape or overwrite what's already on the tape. That's not typically what people use tapes for.
`man mt` would give you the sorts of operations you can do on a tape. The previous link given by bigrigdriver gives you how to put it all together. Note, however, that the device name you use for the tape drive affects how it behaves. /dev/st0 is a rewind device, which means it will rewind after each operation. If you write a file to it, and then in a separate command write another file to it, it will rewind in between and end up overwriting the file. Use /dev/nst0 to avoid that behavior. The "n" refers to the non-rewinding device. Same tape drive, just different driver behavior.
So if I get this right, even if I'm doing recursive backups only of changed files to a tape-drive, every way I turn it, I'll end up with 2 file versions on that tape? (except if I read all and re-write all data on that tape, which I would rather avoid)
How about data recovery then? Can I hunt it down by date-time of writing the data on the tape, or will I just have to guess, which file is newer?
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197
Rep:
If you are doing incremental to the tape, you can assume the later file on the tape is newer. You could track what is on the tape by keeping a catalog file on disk. Gnutar will generate that for you from the tar file. This is basically what programs like Amanda do for you automatically. When you do an amrecover, for example, it is looking at the catalog files while you navigate through to what you want to recover. When you ask it to go ahead and do it, it tells you what tape to load and reads the appropriate records. Depending on what you want, Amanda may be overkill for you, but you can find out more about it here http://wiki.zmanda.com/index.php/Main_Page, if you are interested.
Thank you both for lots of information. I'm sure it will be useful for me.
As for Amanda...good to know that it exists, and I'm sure I'll learn much from it, but it's not an option for me at the moment.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339
Rep:
one thing is tape drives are VERYoutdated
and have been since the mid 1990s or earlyer and external harddisks are so cheap and reliable that it would be better to just get one of those
one thing is tape drives are VERYoutdated
and have been since the mid 1990s or earlyer and external harddisks are so cheap and reliable that it would be better to just get one of those
They may be outdated, but still many systems use TapeDrives. And for testing purposes, I'd scouted a USB TapeDrive. As for hard disks, they are way less reliable than magnetic tapes. An electric surge can damage the disk, while the electric surge can at worst damage the tapedrive and the current tape inserted, as for the other tapes, they stay intact, so you may loose maybe a week of backups, if you're not backing up enormous amounts of data.
No surge protecting hardware will protect you from a direct lightning strike.
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197
Rep:
Quote:
Originally Posted by smeezekitty
one thing is tape drives are VERYoutdated
and have been since the mid 1990s or earlyer and external harddisks are so cheap and reliable that it would be better to just get one of those
That's a very opinionated response. A lot depends on your environment and requirements. I have several departments that have fairly new, latest technology, tape libraries. We run a 6 week cycle of nightly tapes that handle backups for substantial networks of servers. They are also used for periodic archival tapes. That is in addition to having lab computers backed up to the server's hard drives, and having ZFS running nightly snapshots for the semester on multi-terabyte raid arrays (raidz2 [which is similar to raid 6] with a hot spare) for classroom and student lab data.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.