<?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: tar command changed directory size in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-command-changed-directory-size/m-p/3134127#M799889</link>
    <description>What you can do is a find on boxA to find symbolic links to make sure they are the cause of your problem:&lt;BR /&gt;find EN2001.1 -type l -exec ls -lad {} ';'&lt;BR /&gt;&lt;BR /&gt;Or, to get some more info&lt;BR /&gt;&lt;BR /&gt;find EN2001.1 -type l | while read link&lt;BR /&gt;do&lt;BR /&gt;   echo "`ls -lad $link` -&amp;gt; `ls -adlL $link' `du -sk $link`"&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;When you add up the results from the du's in the loop, they could very well add up to your difference, in which case the -h option of tar is the cause of your size difference. If not, the sparse file option could very well be the cause. In which case you have to look at the type of files and need to think about better ways to duplicate the data, for instance a dump and import.&lt;BR /&gt;</description>
    <pubDate>Wed, 03 Dec 2003 01:24:26 GMT</pubDate>
    <dc:creator>Elmar P. Kolkman</dc:creator>
    <dc:date>2003-12-03T01:24:26Z</dc:date>
    <item>
      <title>tar command changed directory size</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-command-changed-directory-size/m-p/3134122#M799884</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;I used command to move one directory from one box to another.&lt;BR /&gt;In box A&lt;BR /&gt;cd EN2001.1; tar -cvfh - . | remsh csihp08 "(cd /homes/boxB/EN2001.1; tar -xvf - .)"&lt;BR /&gt;&lt;BR /&gt;The original size in boxA is&lt;BR /&gt;# du -sk EN2001.1&lt;BR /&gt;1723142 EN2001.1&lt;BR /&gt;&lt;BR /&gt;After tar command, in boxB, the size got much bigger. &lt;BR /&gt;# du -sk EN2001.1&lt;BR /&gt;4501585 EN2001.1&lt;BR /&gt;&lt;BR /&gt;Can you explain? &lt;BR /&gt;&lt;BR /&gt;Jane&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Dec 2003 19:00:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-command-changed-directory-size/m-p/3134122#M799884</guid>
      <dc:creator>jane zhang</dc:creator>
      <dc:date>2003-12-02T19:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: tar command changed directory size</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-command-changed-directory-size/m-p/3134123#M799885</link>
      <description>Almost certainly that is a result of 1) sparse files or 2) symbolic links being followed.&lt;BR /&gt;&lt;BR /&gt;Sparse files are those with "holes" in them. For example, write 1 byte at offset 0 then seek to offset 1,000,000 and write 1 byte. You now have a file which occupies only 2 blocks but ls -l reports its size as 1MB. When a sparse file is copied the "missing" bytes are filled in with NUL's. More advanced backup like OmniBack or fbackup are able to preserve sparse files. &lt;BR /&gt;</description>
      <pubDate>Tue, 02 Dec 2003 19:11:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-command-changed-directory-size/m-p/3134123#M799885</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-12-02T19:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: tar command changed directory size</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-command-changed-directory-size/m-p/3134124#M799886</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I do not really want to go back to omniback tape to restore if I can do it online.&lt;BR /&gt;&lt;BR /&gt;the big size difference is definitely not desired. Does tar command have any option to reduce the holes? I also need to preserve the symbolic links as well.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Jane</description>
      <pubDate>Tue, 02 Dec 2003 19:15:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-command-changed-directory-size/m-p/3134124#M799886</guid>
      <dc:creator>jane zhang</dc:creator>
      <dc:date>2003-12-02T19:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: tar command changed directory size</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-command-changed-directory-size/m-p/3134125#M799887</link>
      <description>You should be able to change your tar|tar pipeline to an fbackep | frecover -s pipeline. Man fbackup (which doesn't really know about sparse files) and frecover (which does) for details. &lt;BR /&gt;&lt;BR /&gt;Vanilla tar or cpio cannot preserve sparse files.&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Dec 2003 19:30:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-command-changed-directory-size/m-p/3134125#M799887</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-12-02T19:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: tar command changed directory size</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-command-changed-directory-size/m-p/3134126#M799888</link>
      <description>There is no way for any backup program to tell the difference between a normal and sparse file since (as with all Unix flavors) a regular file's format and contents are determined solely by the creating program. What frecover and Omniback will do is to see a string of nulls, stop copying them to disk until non-zero data is encountered and perform an lseek to skip to that particular record and continue writing. The filesystem remembers the empty space by not assigning inodes that to the data areas not written.&lt;BR /&gt; &lt;BR /&gt;It is very important that 1723142 is NOT the true size of the file. If you use cp or tar or cpio or pax or dump, they will all create a copy that is 4501585 in size. This is the true size of the file and if this is a database file, the unoccupied space may eventually become occupied, eventually increasing the orginal file's size. It is very important to note that the file behaves exactly the same way whether the null records exist or not. To see this, use the cksum command on both files. You can also use the cmp command to compare the files. Other than the result from du, the files are truly identical.&lt;BR /&gt; &lt;BR /&gt;It is very seldom the case that a backup then restore of a set files and directories will be the same size. A sparse file can make the copied result larger, but a sparse directory (a directory that once had thousands of files but they were deleted) when copied will be much smaller. This is normal behavior.&lt;BR /&gt; &lt;BR /&gt;As far as symlinks, this can be quite complicated to resolve. A symlink is really just a string that contains the link. There is nothing truly connecting the symlink to a real file or path. So if you restore the link on another system, it may point to nothing. A hard link is just a directory entry that points to the same file and will always work when restored.</description>
      <pubDate>Tue, 02 Dec 2003 21:27:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-command-changed-directory-size/m-p/3134126#M799888</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-12-02T21:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: tar command changed directory size</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-command-changed-directory-size/m-p/3134127#M799889</link>
      <description>What you can do is a find on boxA to find symbolic links to make sure they are the cause of your problem:&lt;BR /&gt;find EN2001.1 -type l -exec ls -lad {} ';'&lt;BR /&gt;&lt;BR /&gt;Or, to get some more info&lt;BR /&gt;&lt;BR /&gt;find EN2001.1 -type l | while read link&lt;BR /&gt;do&lt;BR /&gt;   echo "`ls -lad $link` -&amp;gt; `ls -adlL $link' `du -sk $link`"&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;When you add up the results from the du's in the loop, they could very well add up to your difference, in which case the -h option of tar is the cause of your size difference. If not, the sparse file option could very well be the cause. In which case you have to look at the type of files and need to think about better ways to duplicate the data, for instance a dump and import.&lt;BR /&gt;</description>
      <pubDate>Wed, 03 Dec 2003 01:24:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-command-changed-directory-size/m-p/3134127#M799889</guid>
      <dc:creator>Elmar P. Kolkman</dc:creator>
      <dc:date>2003-12-03T01:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: tar command changed directory size</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-command-changed-directory-size/m-p/3134128#M799890</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Thanks you all, I will need to consider the other method to move the directory which contains symbolic links.&lt;BR /&gt;&lt;BR /&gt;Jane</description>
      <pubDate>Wed, 03 Dec 2003 13:40:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-command-changed-directory-size/m-p/3134128#M799890</guid>
      <dc:creator>jane zhang</dc:creator>
      <dc:date>2003-12-03T13:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: tar command changed directory size</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-command-changed-directory-size/m-p/3134129#M799891</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;according to man pages tar does not follow links unless explicitly told so. Have you compared individuell file sizes? What about block size?&lt;BR /&gt;&lt;BR /&gt;greetings,&lt;BR /&gt;&lt;BR /&gt;Michael&lt;BR /&gt;</description>
      <pubDate>Wed, 03 Dec 2003 13:49:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-command-changed-directory-size/m-p/3134129#M799891</guid>
      <dc:creator>Michael Schulte zur Sur</dc:creator>
      <dc:date>2003-12-03T13:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: tar command changed directory size</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-command-changed-directory-size/m-p/3134130#M799892</link>
      <description>Just a short hint... the pax(1) command also copies sparse files as sparse (and of course handles symbolic links). Have a look at the man page and watch out for the -rw option.&lt;BR /&gt; &lt;BR /&gt;Best regards...&lt;BR /&gt;Dietmar.</description>
      <pubDate>Wed, 03 Dec 2003 16:49:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-command-changed-directory-size/m-p/3134130#M799892</guid>
      <dc:creator>Dietmar Konermann</dc:creator>
      <dc:date>2003-12-03T16:49:49Z</dc:date>
    </item>
  </channel>
</rss>

