You are not logged in.
This is driving me mad. According to this I can use --exclude-from=file.txt to exclude any entries I want, one per line. I was using exactly the same file with rsync for root directory (so backing up /*)
Now, I want to do the same for my home, but here I need to also include the dot files. According to various pages (e. g. here), I am supposed to use '.' or rather '* .*' to include dot files as well, so my current command looks like this:
tar cf /path/to/archive/home.tar --exclude-from=exclude-list.txt * .*
And my ~/exclude-list.txt contains entries like this:
Folder1/
Folder2/
Folder3/
All of the folders are in my home dir. I am also starting the script from my home dir.
Yet looking at the tar, I can see it include all the three excluded folders!
I have also tried to exclude folders separately:
tar cf /path/to/archive/home.tar * .* --exclude='Folder1/'
Folder1 still gets included.
[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]
Offline
would this work for you?
cd; tar cf /path/to/archive/home.tar --exclude-from=exclude-list.txt .
with excludes like:
./Folder1
./Folder2
./Folder3
Last edited by oliver (2015-06-12 19:25:29)
Offline
This seems to work, thanks! I just wonder why it worked with rsync but doesn't with tar...
[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]
Offline