I can't seem to get my head around rsync - the basic syncing I've got working but I now want to include certain files and use the delete option, but then it all goes wrong.
On the source I've got:
A_Folder/file1
A_Folder/file2
A_Folder/file3
B_Folder/file1
B_Folder/file2
B_Folder/file3
Z_Folder/file1
Z_Folder/file2
Z_Folder/file3
If my syntax is correct it should rsync A_Folder to the destination but it syncs everything. I want to sync A* and B* folders.
Also if I add a file to the destination is doesnt delete it!
rsync --progress --delete -avv --include '[A-B]*' --recursive /home/folder1/ /home/folder2/
Where am I going wrong?