<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: script help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2896640#M104115</link>
    <description>Right when I hit submit I had another idea.&lt;BR /&gt;&lt;BR /&gt;create the tar file locally.&lt;BR /&gt;&lt;BR /&gt;scp the file across(you will still need public keys)&lt;BR /&gt;&lt;BR /&gt;then to the ssh command and only include the part you need to login and write the tape.&lt;BR /&gt;&lt;BR /&gt;It makes the command line less complex and easier to debug&lt;BR /&gt;&lt;BR /&gt;tar -cvf "$list" &lt;BR /&gt;scp tarfile remotlocation&lt;BR /&gt;ssh hostname dd of=/dev/rmt/0m &lt;BR /&gt;&lt;BR /&gt;Just make the process on the other box something that writes the tar file straight to tape.&lt;BR /&gt;&lt;BR /&gt;P</description>
    <pubDate>Tue, 04 Feb 2003 19:10:12 GMT</pubDate>
    <dc:creator>Steven E. Protter</dc:creator>
    <dc:date>2003-02-04T19:10:12Z</dc:date>
    <item>
      <title>script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2896638#M104113</link>
      <description>Hi, I am trying to write a script that will do a tar of the / , then ssh to another host and write to the tape on the host. Unfortunately the script doesn't seem to work. Any assistance is greatly appreciated.&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;list=`cat /root/list` (just has / in the file)&lt;BR /&gt;backuplog=/var/tmp/backup.log&lt;BR /&gt;date=`date`&lt;BR /&gt;&lt;BR /&gt;tar -cvf "$list" | ssh hostname dd of=/dev/rmt/0m&lt;BR /&gt;&lt;BR /&gt;#end of script&lt;BR /&gt;&lt;BR /&gt;Here is the result that is produced:&lt;BR /&gt;&lt;BR /&gt;tar: Cowardly refusing to create an empty archive&lt;BR /&gt;Try `tar --help' for more information.&lt;BR /&gt;0+0 records in&lt;BR /&gt;0+0 records out&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Feb 2003 19:01:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2896638#M104113</guid>
      <dc:creator>Ragni Singh</dc:creator>
      <dc:date>2003-02-04T19:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2896639#M104114</link>
      <description>ssh [-l login_name] hostname | user@hostname [command]&lt;BR /&gt;&lt;BR /&gt;For this to work without password prompting, you will have needed to exchange public keys(attached)&lt;BR /&gt;&lt;BR /&gt;From the man page.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The file $HOME/.ssh/authorized_keys lists the public keys that are permitted for logging in.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;There are a ton of options on the manpage that might be relavent in making this process work.&lt;BR /&gt;&lt;BR /&gt;Don't give up and use rexec...&lt;BR /&gt;&lt;BR /&gt;P</description>
      <pubDate>Tue, 04 Feb 2003 19:07:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2896639#M104114</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-02-04T19:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2896640#M104115</link>
      <description>Right when I hit submit I had another idea.&lt;BR /&gt;&lt;BR /&gt;create the tar file locally.&lt;BR /&gt;&lt;BR /&gt;scp the file across(you will still need public keys)&lt;BR /&gt;&lt;BR /&gt;then to the ssh command and only include the part you need to login and write the tape.&lt;BR /&gt;&lt;BR /&gt;It makes the command line less complex and easier to debug&lt;BR /&gt;&lt;BR /&gt;tar -cvf "$list" &lt;BR /&gt;scp tarfile remotlocation&lt;BR /&gt;ssh hostname dd of=/dev/rmt/0m &lt;BR /&gt;&lt;BR /&gt;Just make the process on the other box something that writes the tar file straight to tape.&lt;BR /&gt;&lt;BR /&gt;P</description>
      <pubDate>Tue, 04 Feb 2003 19:10:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2896640#M104115</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-02-04T19:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2896641#M104116</link>
      <description>Why not just use gnu tar??&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.cs.utah.edu/hppd/hpux/Gnu/tar-1.13.25/" target="_blank"&gt;http://hpux.cs.utah.edu/hppd/hpux/Gnu/tar-1.13.25/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Tue, 04 Feb 2003 19:13:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2896641#M104116</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2003-02-04T19:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2896642#M104117</link>
      <description>Actually, it looks like you are using gnu's tar, the "--help" gave it away. Why not use the "remote" option:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.gnu.org/manual/tar/html_mono/tar.html#SEC123" target="_blank"&gt;http://www.gnu.org/manual/tar/html_mono/tar.html#SEC123&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Tue, 04 Feb 2003 19:18:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2896642#M104117</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2003-02-04T19:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2896643#M104118</link>
      <description>Have tar write to stdout...&lt;BR /&gt;&lt;BR /&gt;try this:&lt;BR /&gt;&lt;BR /&gt;tar cvf - "$list" | ssh hostname dd of=/dev/rmt/0m&lt;BR /&gt;&lt;BR /&gt;hope this helps&lt;BR /&gt;-denver</description>
      <pubDate>Tue, 04 Feb 2003 19:25:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2896643#M104118</guid>
      <dc:creator>Denver Osborn</dc:creator>
      <dc:date>2003-02-04T19:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2896644#M104119</link>
      <description>With gnu tar, it would be something like this:&lt;BR /&gt;&lt;BR /&gt;/opt/tar/bin/tar -cv  --file=hostname:/dev/rmt/0m "$list"&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Tue, 04 Feb 2003 19:39:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2896644#M104119</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2003-02-04T19:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2896645#M104120</link>
      <description>Thanks for all the help all but how would I specify it if I am only taring up local and not any NFS mounted filesystems. In teh $list, I just have / which is what I want but not include any NFS mounted filesystems. Thanks for all the help and I will assign points once I have this up and running.</description>
      <pubDate>Tue, 04 Feb 2003 20:14:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2896645#M104120</guid>
      <dc:creator>Ragni Singh</dc:creator>
      <dc:date>2003-02-04T20:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2896646#M104121</link>
      <description>I'm not familiar with an option to restrict tar to a single filesystem...&lt;BR /&gt;&lt;BR /&gt;How about pax?&lt;BR /&gt;&lt;BR /&gt;pax -wXx ustar / | ssh user@host  dd of=/dev/rmt/0m&lt;BR /&gt;&lt;BR /&gt;Or cpio?&lt;BR /&gt;&lt;BR /&gt;find / -xdev | cpio -o | ssh user@host dd of=/dev/rmt/0m&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Feb 2003 20:57:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2896646#M104121</guid>
      <dc:creator>Jordan Bean</dc:creator>
      <dc:date>2003-02-04T20:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2896647#M104122</link>
      <description>Try this&lt;BR /&gt;&lt;BR /&gt;tar -cv / | ssh username@ip_address dd of=test.tar&lt;BR /&gt;&lt;BR /&gt;or &lt;BR /&gt;&lt;BR /&gt;tar -cv / | ssh username@ip_address dd of=/dev/rmt/0m&lt;BR /&gt;                                         &lt;BR /&gt;the above is interactive and will prompt you for a password unless you&lt;BR /&gt;have set up your ssh client to work without one&lt;BR /&gt;&lt;BR /&gt;I would test this on a small directory and in a test environment before using&lt;BR /&gt;it in cron and in production environment.&lt;BR /&gt;&lt;BR /&gt;ex:&lt;BR /&gt;tar -cv  /test/blabla/ | ssh username@ip_address dd of=/whatever/test.tar&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hope this helps &lt;BR /&gt;Jean-Pierre Huc</description>
      <pubDate>Wed, 05 Feb 2003 14:07:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2896647#M104122</guid>
      <dc:creator>Huc_1</dc:creator>
      <dc:date>2003-02-05T14:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2896648#M104123</link>
      <description>Be sure to heed Denver's advice.  The tar command you posted was specifying "$list" as the target for the tarfile to be created, not the source.&lt;BR /&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Wed, 05 Feb 2003 15:24:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2896648#M104123</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2003-02-05T15:24:48Z</dc:date>
    </item>
  </channel>
</rss>

