General
cancel
Showing results for 
Search instead for 
Did you mean: 

tarring a file to a remote tape device via ssh

Andrew Kaplan
Super Advisor

tarring a file to a remote tape device via ssh

Hi there --

I would like to run a tar backup on a linux system and have the backup occur on a remote system's tape drive, in this case hp-ux 10.20, via ssh. Is this possible, and if so, what is the correct syntax. FYI -- I have set up public and private keys between the two systems, and the account in question has automatic authentication set up.
A Journey In The Quest Of Knowledge
3 REPLIES
Ivan Ferreira
Honored Contributor

Re: tarring a file to a remote tape device via ssh

The syntax should be something like this:

localhost> tar cvf - /path_to_files | ssh remotehost dd of=/dev/rmt/0m

localhost> ssh remotehost dd if=/dev/rmt/0m | tar tvf -


You can try different block sizes in the command to try to get better performance.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Alan_152
Honored Contributor

Re: tarring a file to a remote tape device via ssh

any particular reason you want to use tar instead of rdump?
Steven E. Protter
Exalted Contributor

Re: tarring a file to a remote tape device via ssh

Shalom,

Unless have a product like Veritas netbackup making the tape drive shareable, you must transfer the file and then back i tup.

scp -p filename servername:/tmp
ssh servername "tar cv *"
The asterisk is the fileset to be archived.

This can be done password free by exchanging public keys.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com