2011-01-22

リモートのテープを用いた tar

リモートのテープに tar を出力するには,tar -cf - files | rsh remote dd of=/dev/tape obs=size のように以前は dd を用いていた (http://download.oracle.com/docs/cd/E19963-01/821-1459/6nmem32ee/).Solaris の man には例も載っていたように思う.

調べたところ,GNU tar では rmt(8) を用いることになっている (GNU tar 1.25: 9.2 Remote Tape Server).例えば,tar -c --rsh-command=/usr/bin/ssh -vf user@remote:/dev/tape files のように実行する (GNU tar 1.25: 9.1 Device Selection and Switching).この例では rsh ではなく ssh を使っている.私の環境では必要なかったが,オプション --rmt-command=cmd Notifies tar that it should use cmd instead of the default