3

I'm trying to backup my entire VM on Fedora Linux. I'm using the following command

tar -cvpzf / test/backup.tar.gz --exclude=/test

But when I do that, I come up with this error:

tar (child): /: Cannot open: Is a directory tar
(child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now 

Can somebody please explain what I'm doing wrong?

5

You need to specify the archive name before the directory:

tar -cvpzf test/backup.tar.gz / --exclude=/test
  • Now I'm getting a broken pipe error...any suggestions? – Nicole Louise Jun 6 '17 at 16:17
0

Name target archive file first:

tar -cvpzf test/backup.tar.gz ...

followed by the directory(ies) to tar:

tar -cvpzf test/backup.tar.gz / --exclude=/test

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.