While creating a level-0 archive I can do this:

 tar -cf - . | pv -s $(du -sb . | awk '{print $1}') | gzip > out.tgz

But in case of a level-1 (incremental) archive, I don't know beforehand what the size of data to be archived will be.
So I can't give that value to pv with the -s parameter (or have any idea about how long it'll take).

What can be done?

  • 2
    tar -c --checkpoint=.[FREQ_NUM] where the $FREQ_NUM refers to a count of records processed - which are 10240 bytes each by default. You don't need pv or awk for this with GNU tar.
    – mikeserv
    Jan 10, 2015 at 22:30
  • @mikeserv that's good to know. but I still like the pv's display better. And this way it's still not possible to know when the operation is going to end.
    – Priv5000
    Jan 11, 2015 at 14:48
  • There are many kinds of --checkpoint-action from among which I mentioned only the most trivial. You can run a script, for example. You can find more in info tar.
    – mikeserv
    Jan 11, 2015 at 14:57
  • this Jan 13, 2015 at 12:46
  • First, you are not talking about tar but about gtar. Second: be careful, GNU tar supports incremental backups but fails to restore them in case of special constraints with renamed directories. If you like to use a verified incremental backup method, I recommend star.
    – schily
    Mar 6, 2020 at 10:58

1 Answer 1


Assuming you perform your incremental archives by tarring the directory and running the output through a filter that returns the difference between this and your existing archives, your current progress calculation could be fine in this case. Why? Because progress is determined by how much of the directory has tar read so far.

Now then, this is just a supposition. Care to share the command you use to make an incremental archive?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .