tar as root like this:
cd / tar --create \ --verify \ --exclude-backups \ --exclude-caches \ --auto-compress \ --file /tmp/home.tar.gz \ --exclude=/home/elena/.gvfs \ home
tar: home/elena/.gvfs: Cannot stat: Permission denied
I would expect the
.gvfs directory to be ignored completely. Why is GNU
stat over it?
As to why I'm using
/home/elena/.gvfs - an absolute path - to match the
.gvfs directory, it is because - to my knowledge - there is no other way to select single directories for exclusion without excluding matching subdirectories at any level as well.
I've tried putting the
--exclude line after
home, to take possible quirks in different versions of
tar into account, but that changes nothing.
Thanks for your attention.
tar version: 1.23
~/.gvfs is a way to access the Gnome Virtual File System I'm skipping it because I know it can't be accessed, and it doesn't make sense to archive it. I still wonder why
tar doesn't skip it completely.