Hi Wayne, thank you for your answer. I tried your proposals, but still ...
On 30.01.2014 18:23, Wayne Davison wrote: > On Thu, Jan 30, 2014 at 6:06 AM, Helmut Schweinzer <h...@softpoint.de > <mailto:h...@softpoint.de>> wrote: > > Is there a way to exclude files only from the --backup option > (e.g. --backup-exclude or --backup-exclude-from)? > > You'd need to exclude the files from the transfer and then do a separate > rsync run that only included those files, this time without the --backup > option. One possibility is to use --max-size for the backup transfer, > and --min-size for the non-backup transfer. This is not practical for several reasons: The option --max-size would not help as I have other big files for which I do want the --backup feature. And if I use --delete-excluded in my normal rsync and then --exclude to exclude the big files for the next rsync run (without --backup), the big files will be deleted by the first rsync. If something happens before I can finish the second rsync, I lost my rsynced versions of all the big files. Also I would have to maintain two lists of files (one to exclude from the first rsync and one to include in the second). I am rather sure, that this would lead to confusions and problems in the future. > Starting with 3.1.0 you can delete a specific file on a remote rsync > daemon with this idiom: > > rsync --delete-missing-args non-existant-filename > host::module/backup/path/file This is an interesting feature. But it seams that I have to start an rsync for every file I want to delete as I don't know how to provide multiple destination files. Or is it possible to use something like --include-from in combination with the option --delete-missing-args? But still one ore more additional rsyncs would be needed. And the file list needed to be dynamic as the path of the backup-dir includes a timestamp. > Perhaps triggering the post-xfer option for the rsync server might > be a solution. But can I inject a post-xfer script to the server? > > You have to configure it into your rsync module in the daemon's config > file. For safety reasons that can't be specified remotely. My question was whether I can first rsync a script which is then used as post-xfer script for the daemon. But as I understand the post-xfer script runs as the daemon user without any chroot. So rsyncing such a script into one module and then executing it would be very dangerous, as it could access files of all modules of the server (and more). Perhaps I could use chroot to the modules chroot in the post-xfer-script. But this would involve having libraries and other binaries in the modules chroot. So any of the afore mentioned methods has several drawbacks. Therefore I want to express a feature request for something like --backup-exclude or --backup-exclude-from. Regards Helmut Schweinzer -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html