How to create a log of an rsync transfer on the remote server?

I have a lovely functional bash script, which uses rsync to create a backup on a remote server, utilising key-based authentication.

It uses a standalone rsync command, rather than having to set up an rsync server. It runs on a cron job, for a user specifically created to handle the sync process.

It writes logs to a directory in /var/log on the local machine, and everything is great. I would like it to be possible to write logs to the remote server too, which is where I'm a bit stuck.

I'd like to avoid having to use another rsync command to transfer the local log file within the script if possible, but if that's the only sensible way, so be it.

Is there a simple mechanism to write a log on the remote end?

6 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like