<?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: Corrupted Files when used tar command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/corrupted-files-when-used-tar-command/m-p/3825878#M778505</link>
    <description>We have to restore /etc from the backup and copy the /stand/build/vmunix_test to /stand/vmunix.  It was a horrible experience.  Anyhow, we are making Ignite tape and run a full backup before we are rebooting.&lt;BR /&gt;&lt;BR /&gt;Keep your finger crossed.  &lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Adrianne</description>
    <pubDate>Tue, 18 Jul 2006 19:20:03 GMT</pubDate>
    <dc:creator>Adrianne Hoang</dc:creator>
    <dc:date>2006-07-18T19:20:03Z</dc:date>
    <item>
      <title>Corrupted Files when used tar command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/corrupted-files-when-used-tar-command/m-p/3825876#M778503</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;In my production line I typed:&lt;BR /&gt;&lt;BR /&gt;u ;tar -cvf - . | (cd /u.sav ; tar -xvf -)&lt;BR /&gt;&lt;BR /&gt;I did it under root and all the files in /etc got over written, SAM got corrupted, and vmunix got corrupted as well.  Could you tell me why it is doing this?&lt;BR /&gt;&lt;BR /&gt;Please advise,&lt;BR /&gt;Adrianne</description>
      <pubDate>Tue, 18 Jul 2006 18:16:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/corrupted-files-when-used-tar-command/m-p/3825876#M778503</guid>
      <dc:creator>Adrianne Hoang</dc:creator>
      <dc:date>2006-07-18T18:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Corrupted Files when used tar command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/corrupted-files-when-used-tar-command/m-p/3825877#M778504</link>
      <description>looks like we're missing a few pieces at the start of your command line: &lt;BR /&gt;&lt;BR /&gt;mayhap it should have read&lt;BR /&gt;&lt;BR /&gt;cd u ; tar cvf - .| (cd /u.sav ; tar xvf - ) &lt;BR /&gt;&lt;BR /&gt;which in my testing works fine. &lt;BR /&gt;&lt;BR /&gt;if both the first and second cd failed, then you're trying to write the entire contents of your drive from wherever you currently are to wherever you currently are, which will probably result in the corruption you saw. &lt;BR /&gt;&lt;BR /&gt;Why would the cd operations fail? The first directory u wasn't in the current directory (ie you were in / and u is actually under /tmp or some such) -- ditto for /u.sav -- if it is truly under / then fine, otherwise you need the full path to be safe. &lt;BR /&gt;&lt;BR /&gt;hth&lt;BR /&gt;Mark</description>
      <pubDate>Tue, 18 Jul 2006 19:05:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/corrupted-files-when-used-tar-command/m-p/3825877#M778504</guid>
      <dc:creator>Mark Fenton</dc:creator>
      <dc:date>2006-07-18T19:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: Corrupted Files when used tar command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/corrupted-files-when-used-tar-command/m-p/3825878#M778505</link>
      <description>We have to restore /etc from the backup and copy the /stand/build/vmunix_test to /stand/vmunix.  It was a horrible experience.  Anyhow, we are making Ignite tape and run a full backup before we are rebooting.&lt;BR /&gt;&lt;BR /&gt;Keep your finger crossed.  &lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Adrianne</description>
      <pubDate>Tue, 18 Jul 2006 19:20:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/corrupted-files-when-used-tar-command/m-p/3825878#M778505</guid>
      <dc:creator>Adrianne Hoang</dc:creator>
      <dc:date>2006-07-18T19:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Corrupted Files when used tar command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/corrupted-files-when-used-tar-command/m-p/3825879#M778506</link>
      <description>does sound ugly. &lt;BR /&gt;&lt;BR /&gt;Hope not too much was lost between backup and restore. Last time I had to restore a production server from backup we lost about 23 employees work for most of a day (yikes!). &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 18 Jul 2006 19:25:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/corrupted-files-when-used-tar-command/m-p/3825879#M778506</guid>
      <dc:creator>Mark Fenton</dc:creator>
      <dc:date>2006-07-18T19:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Corrupted Files when used tar command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/corrupted-files-when-used-tar-command/m-p/3825880#M778507</link>
      <description>Hi Andranne:&lt;BR /&gt;&lt;BR /&gt;You can protect yourself in situations like this by *only* performing the operation if the 'cd' is successful, thusly:&lt;BR /&gt;&lt;BR /&gt;# ( cd /u &amp;amp;&amp;amp; tar -cvf - . ) | ( cd /u.sav &amp;amp;&amp;amp; tar -xvf - )&lt;BR /&gt;&lt;BR /&gt;...Now, if either change-directory fails, nothing happens.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 18 Jul 2006 19:47:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/corrupted-files-when-used-tar-command/m-p/3825880#M778507</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-07-18T19:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Corrupted Files when used tar command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/corrupted-files-when-used-tar-command/m-p/3825881#M778508</link>
      <description>Thank you for all your help.&lt;BR /&gt;&lt;BR /&gt;Adrianne</description>
      <pubDate>Wed, 19 Jul 2006 09:50:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/corrupted-files-when-used-tar-command/m-p/3825881#M778508</guid>
      <dc:creator>Adrianne Hoang</dc:creator>
      <dc:date>2006-07-19T09:50:09Z</dc:date>
    </item>
  </channel>
</rss>

