--===============0596252872== Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/dMOW5wdLu.0q+dildVN+BL1"; protocol="application/pgp-signature" --Sig_/dMOW5wdLu.0q+dildVN+BL1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Nope, the aws credentials are in the url given in the config file. I also tried setting serviceConfig with options privateTmp=3Dfalse and privateNetwork=3Dfalse but these options seem to be for a later version of systemd. I am on stock 15.09 here. - Arnold (Before anyone asks, the backup is encrypted and only the public part of the gpg key is present on the server.) On Sat, 30 Jan 2016 13:27:52 +0000 zimbatm wrote: > Did you try to pass the AWS keypair trough an environment variable ? I > don't know it that would fix it but it's a 3rd solution, not having > access to the right keys. >=20 > On Sat, 30 Jan 2016 at 13:20 Arnold Krille > wrote: >=20 > > Hi all, > > > > yes, its the first time I am writing on this list. > > > > I am trying to get duply/duplicity to run. When I execute `duply > > amazon backup` in a root shell, all is well. But I want it to be > > run regularly by systemd. So I created a service: > > > > ``` > > systemd.services.duplyamazon =3D > > { > > path =3D [ pkgs.duply ]; > > environment =3D { LANG =3D "C"; HOME=3D"/root"; TMPDIR=3D"/tmp"; }; > > script =3D "duply amazon status"; > > startAt =3D "Sat 4:10:00"; > > }; > > ``` > > > > But when I run that (either by the timer or by `systemctl start > > duplyamazon`, it fails with very strange python backtrace: > > > > ``` > > Jan 30 14:10:08 portal duplyamazon-start[47296]: Using temporary > > directory /tmp/duplicity-b53bV9-tempdir Jan 30 14:10:08 portal > > duplyamazon-start[47296]: Backend error detail: Traceback (most > > recent call last): Jan 30 14:10:08 portal duplyamazon-start[47296]: > > File > > > > "/nix/store/ap2bv0p5m8napigg7f6yciap4nm61ap8-duplicity-0.7.02/bin/.dupl= icity-wrapped", > > line 1519, in Jan 30 14:10:08 portal > > duplyamazon-start[47296]: with_tempdir(main) Jan 30 14:10:08 portal > > duplyamazon-start[47296]: File > > > > "/nix/store/ap2bv0p5m8napigg7f6yciap4nm61ap8-duplicity-0.7.02/bin/.dupl= icity-wrapped", > > line 1513, in with_tempdir Jan 30 14:10:08 portal > > duplyamazon-start[47296]: fn() Jan 30 14:10:08 portal > > duplyamazon-start[47296]: File > > > > "/nix/store/ap2bv0p5m8napigg7f6yciap4nm61ap8-duplicity-0.7.02/bin/.dupl= icity-wrapped", > > line 1354, in main Jan 30 14:10:08 portal duplyamazon-start[47296]: > > action =3D commandline.ProcessCommandLine(sys.argv[1:]) Jan 30 > > 14:10:08 portal duplyamazon-start[47296]: File > > > > "/nix/store/ap2bv0p5m8napigg7f6yciap4nm61ap8-duplicity-0.7.02/lib/pytho= n2.7/site-packages/duplicity/commandline.py", > > line 1062, in ProcessCommandLine Jan 30 14:10:08 portal > > duplyamazon-start[47296]: globals.backend =3D > > backend.get_backend(args[0]) Jan 30 14:10:08 portal > > duplyamazon-start[47296]: File > > > > "/nix/store/ap2bv0p5m8napigg7f6yciap4nm61ap8-duplicity-0.7.02/lib/pytho= n2.7/site-packages/duplicity/backend.py", > > line 223, in get_backend Jan 30 14:10:08 portal > > duplyamazon-start[47296]: obj =3D get_backend_object(url_string) Jan > > 30 14:10:08 portal duplyamazon-start[47296]: File > > > > "/nix/store/ap2bv0p5m8napigg7f6yciap4nm61ap8-duplicity-0.7.02/lib/pytho= n2.7/site-packages/duplicity/backend.py", > > line 209, in get_backend_object Jan 30 14:10:08 portal > > duplyamazon-start[47296]: return factory(pu) Jan 30 14:10:08 portal > > duplyamazon-start[47296]: File > > > > "/nix/store/ap2bv0p5m8napigg7f6yciap4nm61ap8-duplicity-0.7.02/lib/pytho= n2.7/site-packages/duplicity/backends/_boto_single.py", > > line 161, in __init__ Jan 30 14:10:08 portal > > duplyamazon-start[47296]: self.resetConnection() Jan 30 14:10:08 > > portal duplyamazon-start[47296]: File > > > > "/nix/store/ap2bv0p5m8napigg7f6yciap4nm61ap8-duplicity-0.7.02/lib/pytho= n2.7/site-packages/duplicity/backends/_boto_single.py", > > line 187, in resetConnection Jan 30 14:10:08 portal > > duplyamazon-start[47296]: raise BackendException(err.message) Jan 30 > > 14:10:08 portal duplyamazon-start[47296]: BackendException Jan 30 > > 14:10:08 portal duplyamazon-start[47296]: BackendException: Jan 30 > > 14:10:08 portal duplyamazon-start[47296]: 14:10:08.191 Task 'STATUS' > > failed with exit code '23'. > > ``` > > > > I think its either because it can not access the tmpdir or because > > it can not access the network. And I don't know whether that is > > because of some missing environment variables or because of how > > systemd services have to be configured. > > > > Can anyone try to point me in the right direction? > > > > Thanks in advance, > > > > Arnold > > > > > > Background: I am currently setting up a new homeserver with NixOS > > and therefore I am moving all the currently running services of my > > ubuntu based homeserver. Expect more questions from me in the next > > weeks=E2=80=A6 ;-) _______________________________________________ > > nix-dev mailing list > > nix-dev@lists.science.uu.nl > > http://lists.science.uu.nl/mailman/listinfo/nix-dev > > --Sig_/dMOW5wdLu.0q+dildVN+BL1 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAlasu90ACgkQtuvagsE+DE6P4gEAnGHRJ+BC5GQsAEU/xU6qNDUP Qly7EXvr0/FsJNUnLAYA/2ZKsjbCHD8fCn118WHVzEPfDaaoaAFMM/i1YVBIedFG =ucXV -----END PGP SIGNATURE----- --Sig_/dMOW5wdLu.0q+dildVN+BL1-- --===============0596252872== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev --===============0596252872==--