Cron schedule #175
-
Hi everybody,
If I try to add sudo (even though cron runs as root), zrep makes a snapshot, but does not send it to slave server. It doesn't give an error, but only this line on output:
In
When I issue
OS, SW: Ubuntu Server 20.04, kernel 5.4.0-91-generic, zfs-0.8.3-1ubuntu12.13, zrep 1.8.0 Do you have any clue, what could be wrong? Thanks you very much for any info. I wasn't able to find any solution, what could solve this. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Seems like you are missing two things. 2 is of course, error messages :-} |
Beta Was this translation helpful? Give feedback.
-
Thanks @ppbrown for your advices. So the problem was SSH connection (in my case, password auth is disable, only publickey is allowed). Solved with generating ssh keys. Zrep was working fine in terminal, because zrep was forwarding ssh key from my session to second server, so I was able to connect without problem. I didn't realize this. Cron cannot use my ssh key, so it was rejected.
If someone needs help, this is the process I did:
|
Beta Was this translation helpful? Give feedback.
Thanks @ppbrown for your advices.
So the problem was SSH connection (in my case, password auth is disable, only publickey is allowed). Solved with generating ssh keys. Zrep was working fine in terminal, because zrep was forwarding ssh key from my session to second server, so I was able to connect without problem. I didn't realize this. Cron cannot use my ssh key, so it was rejected.
There was also second problem, the need of running zrep with sudo in cron with root privileges. This is almost certainly environment setup problem, because zrep run by cron was probably looking for zfs in
/usr/bin
, but zfs in my case is located in/usr/sbin
and it puts error below. I fixed it with symlink.