I have problem with the tar linux program. I would like to create a incremental backup. I use following tar command for the first full backup:
tar --create --gzip --listed-incremental=$SAVEDIR/backup.snar --file=$SAVEDIR/$DATE.tar.gz $EXCLUDE $DIRECTORY
$EXCLUDE contains for example "--exclude test/testdir --exclude test/testdir2"
$DIRECTORY contains "-C /Users/user1/Desktop/ test"
If I execute the command I get following error:
tar: Option --listed-incremental=/Users/hofmeister/Desktop/test/backup.snar is not supported
Usage:
List: tar -tf <archive-filename>
Extract: tar -xf <archive-filename>
Create: tar -cf <archive-filename> [filenames...]
Help: tar –help
If I change the --listed-incremental option to -g =$SAVEDIR/backup.snar. I get:
Usage:
List: tar -tf <archive-filename>
Extract: tar -xf <archive-filename>
Create: tar -cf <archive-filename> [filenames...]
Help: tar --help
What went wrong?
I use following version of tar: bsdtar 2.8.3 - libarchive 2.8.3
The problem is the tar version which is bsd. With macports you could install gnutar. Here everything works fine!
Looks like you're using bsdtar, and not the gnu tar. bsdtar doesn't support incremental backups. They have slightly different flags too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With