Closed ctvedt closed 1 year ago
Hi. We did change how jottad and jotta-cli communicate with that release. If you take a look at the solution posted here https://github.com/jotta/jotta-cli-issues/issues/162 i think doing something similar will resolve your issue. There is more information about that change under the release notes posted for version 0.12.50392 here: https://docs.jottacloud.com/en/articles/1461561-release-notes-for-jottacloud-cli
Thanks, I got it working again, but had to move the job from non-root user crontab to root crontab. Any plans on making this work again with non-root cron in the future?
For other people struggling with the same issue, this is how I solved it (where ctvedt is the non-root user)
sudo crontab -e
*/5 * * * * su --login ctvedt -c "XDG_RUNTIME_DIR=/run/user/$(id -u ctvedt) jotta-cli download --merge backup/path/ /home/ctvedt/path/ > /home/ctvedt/jottadownload.log"
You don’t need to use root and execute with su from your crontab. The important thing is to make sure you set XDG_RUNTIME_DIR. You can set that variable directly at the top of your crontab to have it available for any and all commands you have.
Make sure you are running the latest version of jotta-cli before reporting an issue.
jotta-cli release (
jotta-cli version
): 0.12.50392Description of problem: jotta-cli download not working via crontab. This was working fine prior to latest version, and I can not figure out how to get it working again. Manual download is working just fine.
crontab for my user (non-root):
*/5 * * * * jotta-cli download --merge backup/path/ /home/ctvedt/path/ > /home/ctvedt/jottadownload.log
this results in:
Expected: If i run the same command from shell, it works fine and as expected:
jotta-cli status (
jotta-cli status
):Relevant logs for the issue (
~/.jottad/jottabackup.log or /var/lib/jotta/jottabackup.log
)Traceback
Additional info: