My system is running on SSD on top of LVM logical volume, formatted to ext4. I'm using noatime option at my fstab for this partition. I'm going to do incremental backups of system partition using LVM snapshot feature and GNU tar.

As I see in documentation of GNU tar, Incremental dumps depend crucially on time stamps, so the results are unreliable if you modify a file's time stamps during dumping (e.g., with the `--atime-preserve=replace' option), or if you set the clock backwards.

Is it safe to do incremental backup using GNU tar if filesystem is used with noatime mount option?


The --atime-preserve=replace restores the access times of dumped files after reading, meaning it changes back and forth while --atime-preserve=system doesn't set the times at all. Probably only the changing timestamp could cause comparison to fail, while with option noatime the access time is not updated at all. Therefore, I'd say it shouldn't cause comparison to give unreliable results.

On the other hand I don't see how last access time atime affects comparison, as incremen.c (GNU tar 1.30) only handles last data modification time mtime and in compare.c:212-214 only compares mtime with tar_timespec_cmp() and then calls report_difference() if modification time differs. I just can't find such comparison for other ext4 timestamps anywhere.

  • I did not understand the effect of atime on an incremental backup comparison. Thank you for clarification. – Dmitriusan May 24 '18 at 15:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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