gtar - order of parameters is important with 1.29?

I have a nightly backup/archival process that uses gtar to collate various files into an archive. Today, I upgraded one of my servers from FreeBSD 10.2 to 10.3. For version upgrades, I usually perform a full re-install (i.e., reformat the disk and install the OS from scratch) to clean up things that may have accumulated since the last install.

A side-effect of this upgrade was an upgrade of the pkg gtar from version 1.28_2 to 1.29. I looked at the commit messages for gtar 1.29 and I saw some things about "verbatim exclusions" or some such, so I suspect there were code changes in the area I'm about to speak to...

After the OS upgrade (with the new version of gtar) I noticed that the daily tar.gz files were significantly larger than they had been over the course of the past few weeks. Digging into the difference, I saw that the exclusions I specified in the gtar command line were being ignored.

This is the difference in behavior that I saw between version 1.28_2 and 1.29.

With 1.28_2, the following syntax worked fine:

Code:
/usr/local/bin/gtar  -C / -cvzf $FullTarget  \
   --files-from $WhatFiles \
   --exclude-from $SkipFiles \
   2>>${FullLog} >>${FullLog}

with gtar 1.29, in order for the exclusions to work, I had to change the command to this:

Code:
${ArchiveCommand}  -C / -cvzf $FullTarget  \
   --exclude-from $SkipFiles \
   --files-from $WhatFiles \
   2>>${FullLog} >>${FullLog}

Notice that the --exclude-from directive had to be moved so that it is before the --file-from directive in order for the excludes to work.



At this point, I made that change for gtar 1.29 (and only that change) and my archive process is back on track, so I really haven't investigated this further. I consider it to be a working work-around, and I'm posting this in case others may have run into this issue with tar 1.29.
 
Back
Top