<?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: How to tar a directory from one host to another using pipe in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974723#M928298</link>
    <description>On the source machine(file holder)&lt;BR /&gt;&lt;BR /&gt;#&amp;gt;cd /"source_directory or files"&lt;BR /&gt;&lt;BR /&gt;#&amp;gt;tar cvf - . | remsh "target_machine" '(cd /"source_directory"; tar - xvf -)'&lt;BR /&gt;&lt;BR /&gt;Verify that the files have been transfered to the target host.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.</description>
    <pubDate>Thu, 15 May 2003 20:59:04 GMT</pubDate>
    <dc:creator>D. Jackson_1</dc:creator>
    <dc:date>2003-05-15T20:59:04Z</dc:date>
    <item>
      <title>How to tar a directory from one host to another using pipe</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974721#M928296</link>
      <description>Can anybody tell me the exact command line syntax to use tar in copying a directory and all its subdirectories and files preserving the permissions and links while transferring from one host to another host.</description>
      <pubDate>Thu, 15 May 2003 20:51:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974721#M928296</guid>
      <dc:creator>ramprakash surulirajan</dc:creator>
      <dc:date>2003-05-15T20:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to tar a directory from one host to another using pipe</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974722#M928297</link>
      <description>The following should work well:&lt;BR /&gt;&lt;BR /&gt;# cd /dir&lt;BR /&gt;# tar -cf - ./* | remsh dest_host "cd /dir; tar -xf -"&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 15 May 2003 20:57:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974722#M928297</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2003-05-15T20:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to tar a directory from one host to another using pipe</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974723#M928298</link>
      <description>On the source machine(file holder)&lt;BR /&gt;&lt;BR /&gt;#&amp;gt;cd /"source_directory or files"&lt;BR /&gt;&lt;BR /&gt;#&amp;gt;tar cvf - . | remsh "target_machine" '(cd /"source_directory"; tar - xvf -)'&lt;BR /&gt;&lt;BR /&gt;Verify that the files have been transfered to the target host.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.</description>
      <pubDate>Thu, 15 May 2003 20:59:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974723#M928298</guid>
      <dc:creator>D. Jackson_1</dc:creator>
      <dc:date>2003-05-15T20:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to tar a directory from one host to another using pipe</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974724#M928299</link>
      <description>In the syntax you have provided will permissions and links be preserved.Also the directory matching the source directory has to exist on the target host .Is that right?</description>
      <pubDate>Thu, 15 May 2003 21:20:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974724#M928299</guid>
      <dc:creator>ramprakash surulirajan</dc:creator>
      <dc:date>2003-05-15T21:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to tar a directory from one host to another using pipe</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974725#M928300</link>
      <description>The above answers are correct, but they assume you have your .rhosts file setup correctly for this to work.&lt;BR /&gt;&lt;BR /&gt;Do a "man rhosts" to learn more. You need to set it up to give permission for remote systems to connect in without a password.&lt;BR /&gt;&lt;BR /&gt;Note- remsh,rlogin are very popular, but the push is to use the secure shell command instead "ssh". This provides encrypted connections between two machines.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Thu, 15 May 2003 21:20:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974725#M928300</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2003-05-15T21:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to tar a directory from one host to another using pipe</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974726#M928301</link>
      <description>Permissions and such are kept.&lt;BR /&gt;&lt;BR /&gt;tar -cf - ./* | remsh dest_host "cd /dir; tar -xf -" &lt;BR /&gt;&lt;BR /&gt;is known as a relative copy. tar backups up at the current directory, then "cd /dir" sets the current directory on the remote system and the following tar will restore folders/files relative to /dir, with all permissions, ownerships retained. Ownership is dependant that /etc/passwd has common entries between the two systems.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Thu, 15 May 2003 21:23:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974726#M928301</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2003-05-15T21:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to tar a directory from one host to another using pipe</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974727#M928302</link>
      <description>One thing I just realized&lt;BR /&gt;&lt;BR /&gt;tar -cf - ./* | remsh dest_host "cd /dir; tar -xf -" &lt;BR /&gt;&lt;BR /&gt;Will not copy files with "." prefixes. Shell considers them "hidden" files. Change command to-&lt;BR /&gt;&lt;BR /&gt;tar -cf - ./* ./.* | remsh dest_host "cd /dir; tar -xf -" &lt;BR /&gt;&lt;BR /&gt;to include ALL files.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Thu, 15 May 2003 21:27:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974727#M928302</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2003-05-15T21:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to tar a directory from one host to another using pipe</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974728#M928303</link>
      <description>If you specify the directory name in your tar command, it will pick up the hidden files (beginning with a ".") in directory and all sub-directories.&lt;BR /&gt;&lt;BR /&gt;Using ssh, the following would work:&lt;BR /&gt;&lt;BR /&gt;tar cvf - direcroty | ssh qe2n1 cd /new/directory/path\; tar xf -&lt;BR /&gt;</description>
      <pubDate>Fri, 16 May 2003 02:22:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974728#M928303</guid>
      <dc:creator>Bill Douglass</dc:creator>
      <dc:date>2003-05-16T02:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to tar a directory from one host to another using pipe</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974729#M928304</link>
      <description>The above commands will work in most cases (as long as the caveats are met).  However, you should generally force a block size on both the write and extract portions.  It can be extremely important across a network, since tar on a given machine may not necessarily default to a blocksize of 20.&lt;BR /&gt;&lt;BR /&gt;(ie;&lt;BR /&gt;cd &lt;DIRECTORY&gt;&lt;BR /&gt;tar -cbf 64 - . | (remsh dest_host "cd /dir; tar -xbf 64 -" &lt;BR /&gt;&lt;BR /&gt;You can also use the find command piped to cpio to do the same thing.&lt;BR /&gt;&lt;BR /&gt;Both solutions do not handle files bigger than 2Gb.  You will have to use fbackup to get those (or cp -p).&lt;BR /&gt;&lt;BR /&gt;find ./ -depth | remsh dest_host "cpio -pmudlx /&lt;TARGET_DIRECTORY&gt;"&lt;BR /&gt;&lt;BR /&gt;You will probably have to play with the remsh or ssh portion of the command to get cpio to work, as I have never tried it from machine A to machine B (except over "YIKES" NFS).&lt;/TARGET_DIRECTORY&gt;&lt;/DIRECTORY&gt;</description>
      <pubDate>Fri, 16 May 2003 05:04:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974729#M928304</guid>
      <dc:creator>Angus Crome</dc:creator>
      <dc:date>2003-05-16T05:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to tar a directory from one host to another using pipe</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974730#M928305</link>
      <description>I wonder why everyone uses a "cd" before "tar" to change the directory to which copy files.&lt;BR /&gt;&lt;BR /&gt;How about using the -C &lt;NEW_DIR&gt; tar option?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Mariani Alberto&lt;/NEW_DIR&gt;</description>
      <pubDate>Fri, 16 May 2003 06:15:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974730#M928305</guid>
      <dc:creator>Mariani Alberto</dc:creator>
      <dc:date>2003-05-16T06:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to tar a directory from one host to another using pipe</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974731#M928306</link>
      <description>On this site, we aren't allowed .rhosts so can't use remsh. &lt;BR /&gt;There is another way, use "rexec" instead of "remsh" - you are prompted for the remote password but otherwise the effect is exactly the same.&lt;BR /&gt;You can also use rexec -l &lt;LOGIN&gt; to connect to the remote machine as someone else, if you have the password. (-l works for remsh too, if .rhosts is set up right).&lt;BR /&gt;&lt;BR /&gt;-- Graham&lt;/LOGIN&gt;</description>
      <pubDate>Fri, 16 May 2003 06:59:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974731#M928306</guid>
      <dc:creator>Graham Cameron_1</dc:creator>
      <dc:date>2003-05-16T06:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to tar a directory from one host to another using pipe</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974732#M928307</link>
      <description>While not tar, here's the command I used to copy data from one machine to another during an upgrade to a new machine.&lt;BR /&gt;&lt;BR /&gt;On the new machine, cd to the dest directory then execute:&lt;BR /&gt;&lt;BR /&gt;date; remsh &lt;OLD host=""&gt; "cd &lt;SRC&gt;; find . -xdev|cpio -oa"|cpio -idmua; date&lt;BR /&gt;&lt;BR /&gt;This will also let you know how long it took to complete.&lt;BR /&gt;&lt;BR /&gt;As mentioned in other notes, you have to set up your .rhosts properly and enable remsh on the source machine, but it worked great for me.&lt;BR /&gt;&lt;BR /&gt;Good luck!&lt;BR /&gt;Seth&lt;/SRC&gt;&lt;/OLD&gt;</description>
      <pubDate>Sat, 17 May 2003 17:06:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974732#M928307</guid>
      <dc:creator>Seth Parker</dc:creator>
      <dc:date>2003-05-17T17:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to tar a directory from one host to another using pipe</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974733#M928308</link>
      <description>How about gzip to help avoid 2GB limit.&lt;BR /&gt;&lt;BR /&gt;Maybe less time on a slow net&lt;BR /&gt;&lt;BR /&gt;tar -cf - ./* ./.*| gzip &amp;gt; | remsh dest_host "cd /dir; gzcat tarfile.tar.gz | tar -xvf -"&lt;BR /&gt;&lt;BR /&gt;Just idea syntax probably wrong.</description>
      <pubDate>Sun, 18 May 2003 13:43:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-tar-a-directory-from-one-host-to-another-using-pipe/m-p/2974733#M928308</guid>
      <dc:creator>Larry Basford</dc:creator>
      <dc:date>2003-05-18T13:43:00Z</dc:date>
    </item>
  </channel>
</rss>

