|
From: | Russell Clemings |
Subject: | Re: [Duplicity-talk] Failures on backup jobs from cron |
Date: | Mon, 27 Feb 2023 14:51:32 -0800 |
such issues usually are caused by cron not setting PATH env var or wrongly. in my experience ,)_______________________________________________
to debug it, run 'which python3'
1. in cron. pipe to file or logger to retrieve the output
2. as root
comparing both ourputs you will probably see that different python interpreters are used, with one not having the missing modules installed in it's default location
resolve by adding the PATH env var of the root shell at crontab top.
good luck.. ede/duply.netOn February 27, 2023 9:48:24 PM GMT+01:00, Scott Hannahs via Duplicity-talk <duplicity-talk@nongnu.org> wrote:You may need to set the PYTHONPATH variable when running from Cron or other non-shell systems.-ScottOn Feb 27, 2023, at 14:37, Russell Clemings via Duplicity-talk <duplicity-talk@nongnu.org> wrote:_______________________________________________I've got a curious problem suddenly with duplicity on two of more four servers.If I run a backup job as root, everything works fine. If it runs from the root cron, I get this:
First server:
Traceback (most recent call last):
File "/home/xxxx/duplicity-0.8.12.1612/bin/duplicity", line 30, in <module>
from future import standard_library
ModuleNotFoundError: No module named 'future'
Second server:
Traceback (most recent call last):
File "/home/xxxx/duplicity-0.8.12.1612/bin/duplicity", line 39, in <module>
import fasteners
ModuleNotFoundError: No module named 'fasteners'
Both modules are installed, and as I said, the backups run fine from the command line. Also, it works fine from cron on two other servers. (And I realize my duplicity is a few versions behind; updating is on my to-do list.)
Any pointers to help locate the problem are appreciated.
--===============================================
Russell Clemings<russell@clemings.com>
===============================================
Duplicity-talk mailing list
Duplicity-talk@nongnu.org
https://lists.nongnu.org/mailman/listinfo/duplicity-talk
Duplicity-talk mailing list
Duplicity-talk@nongnu.org
https://lists.nongnu.org/mailman/listinfo/duplicity-talk
[Prev in Thread] | Current Thread | [Next in Thread] |