bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] Bug in --listed-incremental with --one-file-system ?


From: Gordon Messmer
Subject: [Bug-tar] Bug in --listed-incremental with --one-file-system ?
Date: Thu, 05 Mar 2009 10:38:54 -0800
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

I'm testing tar on CentOS 5, and seeing some results I don't understand. I've tested the vendor's package of 1.15.1, and a rebuilt 1.20 from Fedora 10, and both of these seem to behave the same. I've also tested tar 1.16 on Debian, which seems to work correctly.

In my tests, using --listed-incremental with --one-file-system can cause some filesystems to be skipped if they are listed on the command line and are also mounted inside an earlier listed filesystem. So if I instruct tar to back up "/" and "/var/", tar will skip "/var/".

I can work around the problem by listing the directories in reverse order (tar /var/ /) or by appending a dot to the inner filesystem (tar / /var/.)

Before each of the following tests, the incremental file was removed.

In the first test, I back up two filesystems which are not nexted, and see an appropriate amount of data backed up:


# /bin/tar --create --file /dev/null --totals --listed-incremental
  /var/backups/tar.snapshot --sparse --one-file-system
  --exclude=/var/backups /etc/ /var/
...
Total bytes written: 44709949440 (42GiB, 2.4GiB/s)


In the second test, I back up two nested filesystems. You can see by the output size that "/var/" is not included. I've also verified this by checking the list of files included in the archive.


# /bin/tar --create --file /dev/null --totals --listed-incremental
  /var/backups/tar.snapshot --sparse --one-file-system
  --exclude=/var/backups / /var/
...
Total bytes written: 942950400 (900MiB, 433MiB/s)


In a third test, I drop the --listed-incremental argument, and both filesystems are dumped.


# /bin/tar --create --file /dev/null --totals --sparse --one-file-system
  --exclude=/var/backups / /var/
...
Total bytes written: 45579591680 (43GiB, 3.7GiB/s)


Finally, I drop --one-file-system, and see an appropriate amount of data backed up.


# /bin/tar --create --file /dev/null --totals --listed-incremental
  /var/backups/tar.snapshot --sparse --exclude=/proc --exclude=/sys
  --exclude=/selinux --exclude=/dev --exclude=/var/backups /
...
Total bytes written: 45593917440 (43GiB, 1.7GiB/s)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]