|
From: | Russell Clemings |
Subject: | Re: [Duplicity-talk] Failures on backup jobs from cron |
Date: | Tue, 7 Mar 2023 14:03:58 -0800 |
Hi Russel,1) Which version(s) of duplicity, Python, OS are you using? Which work and which don't.
2) As to your problem with the cryptography module install, try:$ python3 -m pip install --U cryptography::38.0.4or ignore it completely if you are not using azure backend.
3) On the cron job, make sure all paths are set properly in crontab, and make sure you don't have duplicate duplicity instances:$ find /usr -name duplicity -type f$ find /usr -name duplicity -type d
If you have more than one response from above, uninstall all, and reinstall the one you want.
4) If you installed from source, just remember that the source is non-versioned. We use the last tag as the version during release.There are multiple options both stable and latest:
Stable snap builds - “sudo snap install duplicity —classic" Latest snap builds - “sudo snap install duplicity —classic —edge" Stable pip3 builds - “sudo python3 -m pip install duplicity" Latest pip3 builds - “sudo python3 -m pip install --pre duplicity" Stable duplicity PPA - https://code.launchpad.net/~duplicity-team/+archive/ubuntu/duplicity-release-git Latest duplicity PPA - https://code.launchpad.net/~duplicity-team/+archive/ubuntu/duplicity-develop-git Stable tarball install - https://launchpad.net/duplicity/+downloadSince the snap versions have all the pypi stuff resolved that may be your best bet.I hope some of this helps....Thanks,...KenOn Mon, Mar 6, 2023 at 4:19 PM Russell Clemings via Duplicity-talk <duplicity-talk@nongnu.org> wrote:OK, well, I gave up. Everytime I tracked down and included a dependency (via PYTHONPATH), I'd just get another failure from another missing dependency.So I decided that if I was going to spend that much time on it, I might as well just start fresh with the current version, following the instructions here:It seems to have installed OK, except for an error with pip3 install -r requirements.txt:---Collecting cryptography>=2.1.4 (from azure-storage-blob->-r requirements.txt (line 18))
Using cached https://files.pythonhosted.org/packages/fa/f3/f4b8c175ea9a1de650b0085858059050b7953a93d66c97ed89b93b232996/cryptography-39.0.2.tar.gz
Complete output from command python setup.py egg_info:
=============================DEBUG ASSISTANCE==========================
If you are seeing an error here please try the following to
successfully install cryptography:
Upgrade to the latest pip and try again. This will fix errors for most
users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
=============================DEBUG ASSISTANCE==========================
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-g7v1tzdv/cryptography/setup.py", line 18, in <module>
from setuptools_rust import RustExtension
ModuleNotFoundError: No module named 'setuptools_rust'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-g7v1tzdv/cryptography/---Upgrading pip as suggested didn't do anything:---xxxxxx@xxxx2 [~/duplicity-main]# python3 -m pip install --upgrade pip
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pip in /usr/local/python3.8/lib/python3.8/site-packages (23.0.1)---Finally when I try to run a backup script, I get what I think are some boto errors:---Attempt of list Nr. 1 failed. ClientError: An error occurred (403) when calling the HeadBucket operation: Forbidden
Attempt of list Nr. 2 failed. AttributeError: 'NoneType' object has no attribute 'objects'
Attempt of list Nr. 3 failed. AttributeError: 'NoneType' object has no attribute 'objects'
Attempt of list Nr. 4 failed. AttributeError: 'NoneType' object has no attribute 'objects'
Giving up after 5 attempts. AttributeError: 'NoneType' object has no attribute 'objects'---Suggestions?
On Mon, Feb 27, 2023 at 2:51 PM Russell Clemings <rclemings@gmail.com> wrote: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.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
--===============================================
Russell Clemings<russell@clemings.com>
===============================================
--_______________________________________________===============================================
Russell Clemings<russell@clemings.com>
===============================================
Duplicity-talk mailing list
Duplicity-talk@nongnu.org
https://lists.nongnu.org/mailman/listinfo/duplicity-talk
[Prev in Thread] | Current Thread | [Next in Thread] |