Tip: Use rsync variables in "Extra options"

  • Forgive me if this is common knowledge, but I couldn't find any forum references to rsync parameters, and was going to report a bug, but I found a workaround for my issue.


    You can specify environment variables (such as %RSYNC_USER_NAME%) by adding the appropriate option (even if provided in the web ui) under extra options.

    The UI doesn't let you type %RSYNC_USER_NAME% in the User field, nor * in the Group field.

    However, I was able to work around that by adding uid and gid directly to extra options, which places them at the end of the module config.

    This works as expected, and files are stored on the server as the authenticating user.

    Perfect for home directories!



    You can find the available variables on the rsync documentation (which happens to be linked to from the OMV UI): https://www.samba.org/ftp/rsync/rsyncd.conf.html

  • Agricola

    Approved the thread.
  • Nice tip, thanks. I was about to post a question about this. It would be useful to have a proper option to use the RSYNC_USER_NAME setting.

  • The OMV 6 GUI doesn't allow you to enter multiple lines of options though. I would raise a bug, but the github tracker tells me I should only do so if directed by a developer here.

  • votdev , could you make the extra options field for the rsync module a multi-line field? From my reading of the source it would need to be a textarea rather rather than text input, like the rsync server settings page.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!