Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

according to, i try to create incremental backups with tar and --listed-incremental on my Ubuntu, but the --listed-incremental part does not work for me.

On day 0 I execute:

SNAR_TODAY=`date +%Y_w%U_${DOW}`
FILENAME=`date +%Y%m%d_%H%M`

tar -cvf $TARGET/$FILENAME.tar --atime-preserve --listed-incremental=$TARGET/$SNAR_TODAY.snar $SOURCE &> $TARGET/$FILENAME.log

Does work fine and creates a full backup of my /srv/data and a 2011_wXY_0.snar.

On day 1-6 I execute:

DOW=`date +%u`
SNAR_TODAY=`date +%Y_w%U_${TODAY}`

FILENAME=`date +%Y%m%d_%H%M`

tar -cvf $TARGET/$FILENAME.tar --atime-preserve --listed-incremental=$TARGET/$SNAR_TODAY.snar $SOURCE &> $TARGET/$FILENAME.log

Problem: tar creates a new .tar of the complete directory - not doing any incremental stuff.

System: Linux srv03 2.6.32-28-server #55-Ubuntu SMP

$ tar --version
tar (GNU tar) 1.22
Copyright (C) 2009 Free Software Foundation, Inc.

And yes i know, there are many pre-built solutions out there, but there are some reasons why i build my own. Thanks for any ideas why tar is not working for me as i expect.

share|improve this question
up vote 3 down vote accepted

Looks like --atime-preserve break incremental backups. :( Try --atime-preserve=system - it's not documented on man page, but works.

share|improve this answer
I now had time to test this: and you are absolutely right: with "=system" behind the --atime-preserve its working as expected! Thank you very much! – Rolf Wenger Oct 5 '12 at 12:59

I do tar tar ((GNU tar) 1.23) based incremental backups as well (using cron): this is the (slightly modified) output of crontab -l from my setup:


0 0 * * 1-6 tar czfg /path/to/website/backups/website_inc_`date +\%Y\%m\%d`.tgz /path/to/website/backups/ -C /path/to/website/ public_html

0 0 * * 0 tar czfg /path/to/website/backups/website_inc_`date +\%Y\%m\%d`.tgz /path/to/website/backups/ --level=0 -C /path/to/website/ public_html

c = create; z = gzip compress; f=file; g=incremental; -C = directory to change to(

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.