I use the following tar command to try to backup my entire file system
tar -cvpzf test/backup.tar.gz --exclude=/test
And I receive the following error message
tar: Cowardly refusing to create an empty archive
Try 'tar --help' or 'tar --usage' for more information.
Can somebody point me in the right direction as to how to use tar and explain why it's trying to create an empty archive?
Append will create the tar file if it doesn't already exist, so you don't need to check if it's the first file, just append and if it's the first file tar will create it.
The tar command writes archives using the specified value of the Blocks parameter only when creating new archives with the -c flag.
You defined what to exclude, but didn't define what you actually want in the archive. Supply at least one path. If you want entire filesystem, then tar -c....... /
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