Guillermo Rozas wrote at about 22:37:09 -0300 on Wednesday, February 16, 2022:
> >
> > > Certainly, this would be more bandwidth-friendly if it was possible to
> > > do this compression before transferring to server, but I can't figure
> > > out how I could accomplish this.
> > Presumably harder as it would require host-side code to do things
> > such as running a patched host version of rsync (or other transfer
> > method executable)
> >
>
> I think you can achieve this by running a wrapper script on the client and
> tying its execution to the BackupPC key. The steps would be:
>
> - generate a key to use by the rsync/ssh connection from BackupPC and
> nothing else (you should do this for security reasons anyway)
> - on the client's authorized_keys file, use the "command" option to execute
> a script every time a connection from this key is made. This command will
> run instead of the rsync command BackupPC wants to run, and the latter will
> be saved in the SSH_ORIGINAL_COMMAND variable
> - in this script, pipe in some way your compression process into the rsync
> command sent originally by BackupPC
>
> This is the method the rrsync [1] script uses to restrict rsync to a
> certain folder and options (I'm actually using a modified version of it
> with BackupPC). The hard part is to figure out the third point above...
>
To do what you are suggesting, you don't need to play with the
authorized_key file... you can just set Conf{RsyncClientPath} to
whatever new version of rsync you have written.
But I really don't see how your suggestion solves anything...
Unless you want to re-write the guts of rsync on the client side
(similar to what Craig has done with rsync_bpc on the server side, I
don't see how you can pre-process files on the client side.
Even if you did somehow pre-compress files and pipe them onto the
client side rsync, you would probably break the ability for rsync to
tell changed files based on stat'ing the file size...
Unless I am missing something...
_______________________________________________
BackupPC-users mailing list
[email protected]
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/