Quote:
Originally Posted by catkin
What do you want to achieve by this?
Depending on what it is, bash process substitution could be a solution.
|
Perfect suggestion!!! Thanks
CATKIN!
Here is what I want to achieve:
I got an used LTO3 scsi tape drive, I have some weakness for tape drives, but have not used one at home for quite a few years, since when DDS became vintage, plus I do not feel comfortable with a singe "to disk" NAS backup, and I do not have money to keep investing in HDs, that would either land on a shelf, or became vulnerable in a RAID configuration... in any case, I would not trust in a HD much for long term archiving.
I connected the LTO to my other box, over 1Gb, transferring backups to that box and dumping them to a tape would be kind of inefficient... dumping the data via tcp directly to the tape device is what I was looking for. I looked at number of ways, most involving ssh - no..... I played with mbuffer once a couple of years ago - it is a great tool for fast streaming devices ( and not only ), that suffer from buffer underruns, killing the device, and the media... Well, if you got a backup made, it is also good to know what files have been backed up ( or not ), and the errors during the process... that is what I wanted to achieve, and with your priceless suggestion catkin I got it to work.
backup client side:
Code:
tar cjv --preserve-permissions --numeric-owner -f >(mbuffer -m 8G -O 10.0.0.113:8000) /root > root_backup.log
backup "server"
Code:
mbuffer -I 8000 -m 12G -f -P 80 -o /dev/nst0
BTW, to increase the compression speed I recompiled the latest tar to use lbzip2 as the bzip2 compressor, to enable multithreading during tar.bz2 archive creation... now the 40-80MB/s native tape drive does not choke during the backup creation ( if it does, than it is once/twice per 200GB backup ) - a multithreaded alternative to lbzip2 is pigz ( gzip )... faster with lower compression ratio...
Thanks again
catkin!
Mike