I am trying to create a .tar file of the filesystem but exclude the /proc directory.
The command I have tried is:
tar -czvf mytar.tgz / --exclude='/proc'
But this does not exclude the directory.
I have also tried it without the single quotes.
# tar --version
tar (GNU tar) 1.31
How can I exclude the directory?
tarcommand, likeThe following options were used after any non-optional arguments in archive create or update mode. These options are positional and affect only arguments that follow them. Please, rearrange them properly.See also the--one-file-systemoption for GNUtar. Also consider using backup software for doing backups, likeresticorborgbackup. – Kusalananda Mar 31 '21 at 09:09