How to update tar file with gzip compression

I performed:

tar -Ppcfz backup.tar.gz on /location/ 

It will: Create a new tar file for / location / Save paths, Save permissions, Compress with gzip

I need to update this tar file later with files from / location / that were not added or new:

 tar -Ppuf backup.tar.gz /location/ 

I get errors:

tar: this is not like tar tar tar: skipping to the next header tar: the archive contains obsolete base-64 headers tar: Unexpected EOF in the tar archive: Error cannot be restored: exit now

Help me please.

+4
source share
1 answer

When upgrading, you can try using the -z flag, but my version of tar says that it cannot update compressed archives. So you need a gunzip file, then update with tar , then gzip .

+2
source

Source: https://habr.com/ru/post/1382611/


All Articles