Recently I had to copy around 13GB of data from one system over to another. However, after copying the files across and running a du on the file folder it was quite different in size. The target folder was showing as being over 16GB for the same data.
Delving further into the file structure coupled with using du, it was noted that some files were the same with ls but different with du. Sparse files was the culprit which can be determine by running “fileplace ” on a suspected file. If in fact it’s a sparse file, you’ll notice the difference.
For a clear definition of sparse files, and how to get around the issue, take a look here. The issue seems to be that AIX tar can’t handle sparse files… However, GNU tar can. So the remedy would be to replace AIX tar with GNU tar. This article explains how to replace AIX’s tar with the GNU tar.
Once that is done, you should be able to create your tarball with utilizing the sparse option (-S). So for example:
# ( tar -Scf - ./ ) | ( ssh testbox 'cd /home/testuser/html && tar -Sxvpf -' )