Is it possible to have rsync do a transform on each file before sending it? This would be useful for things like individually compressed or encrypted backups, or in my case, syncing lossy copies of my FLAC music to an mp3 player or laptop. If not, is there demand for such a feature? It seems like it would be of use to many people, and in principle it shouldn't interfere with incremental file transfers or even checksum-based skipping, since you could transform the file locally before comparing it with the destination file. -Michael
On Sun, 2009-02-08 at 20:28 -0600, Michael Gardner wrote:> Is it possible to have rsync do a transform on each file before sending > it? This would be useful for things like individually compressed or > encrypted backups, or in my case, syncing lossy copies of my FLAC music > to an mp3 player or laptop.This feature is provided by a maintained patch, which is not very mature: http://rsync.samba.org/ftp/rsync/patches/source-filter_dest-filter.diff Like many others, this patch is perhaps worthy but no one has shown an interest in working on it recently. If you are willing to improve the patch to the point that it meets your needs, that would be great. -- Matt
Matt McCutchen wrote:> On Sun, 2009-02-08 at 20:28 -0600, Michael Gardner wrote: >> Is it possible to have rsync do a transform on each file before sending >> it? This would be useful for things like individually compressed or >> encrypted backups, or in my case, syncing lossy copies of my FLAC music >> to an mp3 player or laptop. > > This feature is provided by a maintained patch, which is not very > mature: > > http://rsync.samba.org/ftp/rsync/patches/source-filter_dest-filter.diff > > Like many others, this patch is perhaps worthy but no one has shown an > interest in working on it recently. If you are willing to improve the > patch to the point that it meets your needs, that would be great.I can see this particular example being excessively cpu intensive though - having to re-encode an entire directory of lossless files as a different format so you can compute the hash - plus of course its possible that some encoding processes could be non-deterministic. Only way I can think of to avoid is to keep some sort of pre-computed transform index - original vs re-encoded hash and filename - and check against original hash and filename locally, re-encoded hash and filename remotely.