I take backups of a server with rsync, but those backups are quite large, and I'd like to compress them. Is there a way to have some sort of wrapper around rsync to gunzip the file in the backup, rsync the changes from the live file, then re-gzip the file as soon as it is copied?
I.e. if the source files on the live are foo, bar and baz, the backup has foo.gz, bar.gz and baz.gz.
To restate: I want compressed files at one end and uncompressed files at the other end. I don't want to compress before rsyncing, because even with –rsyncable, it makes rsync less efficient. I know about the -z option to rsync. I don't have space on the backup machine to store all the files uncompressed.
Best Answer
I'm not sure I understand what you're trying to do, but you could create gzipped backups on the main server making sure that they're readily rsyncable and not bother decompressing anything in transit.