Odd Tar behavior

Giorgos Keramidas keramida at ceid.upatras.gr
Tue Nov 23 05:39:05 PST 2004


On 2004-11-22 17:00, Derrick Ryalls <ryallsd at gmail.com> wrote:
> I just observed some really strange behavior with a tar file in my
> backup script.  Using a command like tar -cf /someplace/www.tar www
> (when in /usr/local) it produces a 2 Meg file.  Under webroot, there
> are several files that are 500+ meg in size, so this size value is
> suspect, though it only took a few seconds to create the archive.
>
> The weird part comes in when I untar www.tar.  Suddenly all files
> are there in their full sized glory, leading me to believe that I am
> only saving file pointers or something.  Also, it isn't a
> compression issue as I am not using compression, and the files
> themselves really aren't very compressable.  Whatever the case, how
> do I use tar to create reliable backups, including large files?

Hmm, check that you are not archiving symbolic links instead of the
files themselves.  If that is the case, you might want to use the -H
option of tar.



More information about the freebsd-questions mailing list