Menu

tar --incremental problem

Help
2008-10-03
2012-07-26
  • Scott Glancy

    Scott Glancy - 2008-10-03

    I am using GnuWin32's version of tar 1.13 on Windows XP. I am having trouble using the --incremental option. Here is an example. I have made a directory Files which contains the file a.txt. I make a full backup of it using

    C:\Test>tar --create --verbose --file=files.tar Files
    Files/
    Files/a.txt

    Now I delete a.txt.

    C:\Test>del Files\a.txt

    Next I create an incremental backup of the contents of Files.

    C:\Test>tar --create --verbose --incremental --file=files_inc.tar Files
    Files/

    Next I delete Files.

    C:\Test>rmdir /s /q Files

    I try to restore with my tar archives:

    C:\Test>tar --extract --verbose --file=files.tar
    Files/
    Files/a.txt

    C:\Test>tar --extract --verbose --incremental --file=files_inc.tar
    11071337570/Files/

    What is this string of numbers before /Files/? If I understood how --incremental works, I expect that the file a.txt should be deleted from Files when I extracted files_inc.tar. However,

    C:\Test>dir /b /s
    C:\Test\11071337570
    C:\Test\Files
    C:\Test\files.tar
    C:\Test\files_inc.tar
    C:\Test\11071337570\Files
    C:\Test\Files\a.txt

    A new directory has been created whose name is that string of numbers, and it contains Files. Also, the file a.txt has not been deleted.

    Am I using --incremental incorrectly? What do I need to go to get the desired behavior?

    Thanks.

     
    • Scott Glancy

      Scott Glancy - 2008-10-06

      For the record, I have tested all of the above on a Linux computer using GNU Tar. There the --incremental option worked exactly as I expected using the same syntax. I therefore believe this is a genuine bug with the GunWin32 version of Tar. I will try to report it to the but report list.

       
MongoDB Logo MongoDB