FG
💻 Software

Tar: How to ignore the archive itself

Fresh5 days ago
Mar 15, 202616978 views
Confidence Score0%
0%

Problem

I was planning to do a quick backup of my website. So I tried to run the following command in my webroot: That seemed to be working nicely for a while. Until I discovered it had started to backup ... Is there an easy way that I can get it to ignore the file I am archiving to? Note: I would of cours…

Error Output

tar cvfz backup.tar.gz .

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Tar: How to ignore the archive itself

Low Risk

Try This way shell extends the *, vs the tar reading current directory. The difference is that the produced archive does not contain root folder. If you also need to include hidden files (.files) you can try This includes .files and prevents inclusi…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment