I have rsync running and I'm using the --delete-source-files in the script so after the transfer is done it gets rid of the files in the source folder. However, if I wanted to get rid of everything but then leave say 'folder1' and 'folder2' in there permanently, how do I make exceptions like that with the delete?
Also, if I want to turn on transfer logging so it shows what files were sent across successfully and then write it to a file, is that possible?
--log-file=/log/rsyncTrans
when I add this to the command I get the log with the transfer stats....
Just can't find a way to delete everything from the source directory (including folders) but leave a couple of folders there permanently.