Tar (child) error

backuptar

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?

Best Answer

You need to specify the archive name before the directory:

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