duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Duplicity-talk] Failures on backup jobs from cron


From: Russell Clemings
Subject: Re: [Duplicity-talk] Failures on backup jobs from cron
Date: Mon, 27 Feb 2023 14:51:32 -0800

Thanks. I'll try these and report back.

On Mon, Feb 27, 2023 at 2:03 PM edgar.soldin--- via Duplicity-talk <duplicity-talk@nongnu.org> wrote:
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.net




On 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.

-Scott

On 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


--
===============================================
Russell Clemings
<russell@clemings.com>
===============================================

reply via email to

[Prev in Thread] Current Thread [Next in Thread]