tar backup with excluding some folders

Hi ,

I want to backup the root file system but the size of / is very huge so I want to exclude some file systems.Man page of tar says X option excludes files but I could not do that.I use this command

$ tar -cvf deneme.tar -X exc .

$ cat exc
sql
kkm

I think there is something wrong but I couldnot find the problem.Help..

Thanks

Try using specific paths in the exc file.
./sql
./usr/sql
or whatever.

As Perderabo said put in the full path name. maybe try a * after it e.g /usr/bin/*

There is also a certian directory that the exclude file needs to be in. I haven't used this for awhile but I think it might be the /tmp directory.

The name pages does say where it has to be though.