Linux backups - using pax instead of tar to create a large backup

I had a problem using the tar command this morning while trying to create a large archive, and rather than figure out what in the world I was doing wrong with find, xargs, and tar, I decided to use pax instead. It worked great at creating an archive file that tar could still read, so instead of fighting with the find/xargs/tar three-headed monster to create a large archive, pax bailed me out.

Here's an example of what was failing when trying to use find, xargs, and tar to create my huge backup/archive:

find . -type f -name "*html" | xargs tar cvf jw-htmlfiles.tar -

And here's the pax command that I used to successfully create my large backup:

find . -type f -name "*html" | pax -w -f jw-htmlfiles.tar

Of course I may be doing something wrong in the first example, but that's not the point -- I was able to use pax and solve the problem in less than a minute and get on with life.

Add new comment

Anonymous format

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul type> <ol start type> <li> <pre>
  • Lines and paragraphs break automatically.