Also, when searching in Nixos options it doesn’t show me any option for systemd regarding duplicity.
Eventually i want to run it as a cron job but the error i described occurs when running it in the terminal. I ran it there to see if everything is working as intended.
I tried this just to see if it helps somehow, but i don’t want to run it like this eventually:
I would be willing to run duply with a systemd service if that makes it easier, i’m just not familiar with that (yet).
Yes, duply works with my local backup (where it doesn’t have to use ftps), so duplicity must also be working, as duply is just a frontend. It prints some errors but is still working, maybe the .nix wrapper is not correct?
Let me show you 3 Screenshots, maybe this is helpful:
First, my local backup, which succeeds:
image3840×1541 374 KB
Second, the failed backup to ftps:
image3840×731 209 KB
Third, running lftp in terminal:
I tried duply from the unstable channel but it shows the same errors.
Sorry, i didn’t think of running duplicity without the wrapper.
It shows this:
~ ❯ duplicity /home/sperber/Downloads ftps://username:userpasswd@server.net//test
LFTP version is 4.9.2
Attempt of list Nr. 1 failed. BackendException: Error running 'lftp -c "source /tmp/duplicity-uwg2_bqw-tempdir/mkstemp-laswiouj-1; ( cd /test/ && ls ) || ( mkdir -p /test/ && cd /test/ && ls )"': returned 1, with output:
cd: Fatal error: gnutls_handshake: An unexpected TLS packet was received.
mkdir: Fatal error: gnutls_handshake: An unexpected TLS packet was received.
So, something is up either with lftp or some encryption service.
I would like you to check that is solves your issue: inside nix-shell -p git git-extras:
git clone https://github.com/nixos/nixpkgs
cd nixpkgs
git pr https://github.com/NixOS/nixpkgs/pull/199525
nix-build -A duply
and test that result/bin/duply works correctly.
Thank you for your effort!
Good news and bad news:
It progressed further than usual, pointing out errors in my exclude file for duply. Before, it didn’t do that.
However, after fixing them, i still get the following error:
image3840×1031 304 KB
Btw, how can i delete all the files downloaded / installed during this after we are finished trying it out? I’ve never used nix-shell before and it downloaded close to 3GB.
@symphorien i’m still having the issue with missing lftp. I’m on 22.11 and have duply installed as a system package. Using duply from unstable also shows missing lftp.
Your fix solved this problem when i tested it though and i thought that it would now also be solved if i use the package from the Nixos repo.
Am i missing something?
For reference, here is the output of duply from just now:
~ ❯ duply manitu backup
Start .duply-wrapped v2.4, time is 2022-12-05 14:20:41.
Using profile '/home/sperber/.duply/manitu'.
/nix/store/sibv8i5ms84br3bl98i29r6j28bjvn6y-duply-2.4/bin/.duply-wrapped: line 623: WARNING:: command not found
Using installed duplicity version 0.8.23, /nix/store/sibv8i5ms84br3bl98i29r6j28bjvn6y-duply-2.4/bin/.duply-wrapped: line 617: warning::command not found ( Could not parse the python interpreter used from duplicity (/nix/store/kai9s6mi2c16sk5ba8z8mnl1h6zl8dgx-duplicity-0.8.23/bin/duplicity). Result was ' /nix/store/dsd5gz46hdbdk2rfdimqddhq6m8m8fqs-bash-5.1-p16/bin/bash -e'.), gpg 2.3.7 (Home: /home/sperber/.gnupg), awk 'GNU Awk 5.1.1, API: 3.1', grep 'grep (GNU grep) 3.7', bash '5.1.16(1)-release (x86_64-pc-linux-gnu)'.
Signing disabled. No GPG_KEY entries in config.
Checking TEMP_DIR '/tmp' is a folder and writable (OK)
Test - Encryption with passphrase (OK)
Test - Decryption with passphrase (OK)
Test - Compare (OK)
Cleanup - Delete '/tmp/.35088.1670246442_*'(OK)
--- Start running command PRE at 2022-12-05 14:20:42.504 ---
Skipping n/a script '/home/sperber/.duply/manitu/pre'.
--- Finished state OK at 2022-12-05 14:20:42.514 - Runtime 00:00:00.010 ---
--- Start running command BKP at 2022-12-05 14:20:42.539 ---
/nix/store/dsd5gz46hdbdk2rfdimqddhq6m8m8fqs-bash-5.1-p16/bin/sh: line 1: lftp: command not found
LFTP not found: Please install LFTP.
2022-12-05 14:20:42.702 Task 'BKP' failed with exit code '43'.
--- Finished state FAILED 'code 43' at 2022-12-05 14:20:42.702 - Runtime 00:00:00.163 ---
--- Start running command POST at 2022-12-05 14:20:42.737 ---
Skipping n/a script '/home/sperber/.duply/manitu/post'.
--- Finished state OK at 2022-12-05 14:20:42.754 - Runtime 00:00:00.017 ---
Wasn’t the fix just to allow duply to find lftp in $PATH? (Previously it’d hardcode a fixed $PATH, so it’d ignore the surrounding environment.)
Do you have lftp in $PATH?
Right… If i add lftp to my system packages, it works. I thought you added it as a dependency for duply as you mentioned something about making it work out of the box.