Using syncoid without root ssh login

I would like to replicate ZFS datasets and their snapshots between servers. syncoid seems to be the most highly recommended tool for doing this but it expects to be able to log in as root via ssh and we don’t want to enable this.

Otherwise it seems you have to use zfs allow to permit a non root user to use zfs/syncoid which I’ve attempted without success.

Has anyone got syncoid to work without enabling root logins via ssh? Are there any good guides to getting this configured or what other tools are people using to do this, without ssh root?

You can either edit the /etc/sudoersfile by running the visudo command and give your user permissions to execute zfs without root or you have to set permissions with zfs allow.

ZFS allow is the preferred method here, what did you try already?

It took me most of the weekend to work it out but I’ve now got syncoid working.

I wrote a short guide and I was going to submit it which is when I found the Syncoid gh wiki page, most notably the ‘running without root’ section which is what I had just independently, unnecessarily documented.

Most projects don’t use the wiki on gh so I don’t normally go looking for it but I wish I’d thought of that sooner now!

1 Like