I'm having troubles with the rsync --include-from command. I've read the tips from the first 3 pages in google matching my problem, but I still can't get it to work.
Here is what I want to do. We have 2 server, and I want to sync data from one server to the other. But I only want to send the directories and files that should be transferred. All other dirs/files are not needed.
I created a file called include_files which contains the following data:
+ test1/*
+ test1/tekstbestand.txt
- *
And my command is: rsync -anv --include-from=/home/otsadmin/include_files otsadmin@nisbak:/home/otsadmin/tmp /home/otsadmin/
The output always stays the same:
receiving incremental file list
sent 56 bytes received 10 bytes 44.00 bytes/sec
total size is 0 speedup is 0.00 (DRY RUN)
Please help me understand what I'm doing wrong. Or isn't it even possible in the first place.
I had this problem for ages, you need to specify the folder then the file :-
Or alternatively, if you want to include everything in /test1 then the following