1

My Googling for writing to tapes with encryption have turned up various results.

Most along the lines of piping tar to openssl similar to:

tar cf - /home | openssl des3 -salt -k "Your-Password-Here"

Some then pipe to dd, while other just redirect to the tape device:

tar cf - /home | openssl des3 -salt -k "Your-Password-Here" | dd of=/dev/nst0
tar cf - /home | openssl des3 -salt -k "Your-Password-Here" > /dev/nst0

Question: is there a particular reason to invoke dd for this, or is it safe to just stream "directly" to the tape with a redirection?

4

In general, tape devices like being written to in blocks, so using dd is probably better than just redirecting output. However, your dd command as written won't do blocking. Depending on your tape device, the block size may be vastly different, but a block size of 4k was(*) typical and would be specified by using bs=4096 in the dd command list. Eg: dd of=/dev/rst0 bs=4096

However, googling one of many LTO tape drives recommend a block size of not greater than 256kb. So read / research the best size for your device. You may also be able to use scaling abbreviations on the bs argument: bs=4k or bs=1M.

  • I thought it may be something like that; your answer is clear and concise. It's a HP Ultrium 1760; I'll look into finding it's preferred block size. Thank-you :) – fukawi2 Dec 31 '13 at 0:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.