Backup solution - Deja-dup is not reliable

I did a restore with DEJA_DUP_DEBUG=1 deja-dup.

The restore is from an ext4 external drive to an internal ext4 drive.

Here is the error I got.

DUPLICITY: . Traceback (innermost last):
DUPLICITY: .   File "/nix/store/fq2s2vjvksivwwrq6i5gzlbxkbqsh1a5-duplicity-0.8.23/bin/..duplicity-wrapped-wrapped", line 88, in <module>
DUPLICITY: .     with_tempdir(main)
DUPLICITY: .   File "/nix/store/fq2s2vjvksivwwrq6i5gzlbxkbqsh1a5-duplicity-0.8.23/bin/..duplicity-wrapped-wrapped", line 71, in with_tempdir
DUPLICITY: .     fn()
DUPLICITY: .   File "/nix/store/fq2s2vjvksivwwrq6i5gzlbxkbqsh1a5-duplicity-0.8.23/lib/python3.11/site-packages/duplicity/", line 1580, in main
DUPLICITY: .     do_backup(action)
DUPLICITY: .   File "/nix/store/fq2s2vjvksivwwrq6i5gzlbxkbqsh1a5-duplicity-0.8.23/lib/python3.11/site-packages/duplicity/", line 1663, in do_backup
DUPLICITY: .     restore(col_stats)
DUPLICITY: .   File "/nix/store/fq2s2vjvksivwwrq6i5gzlbxkbqsh1a5-duplicity-0.8.23/lib/python3.11/site-packages/duplicity/", line 748, in restore
DUPLICITY: .     if not patchdir.Write_ROPaths(config.local_path,
DUPLICITY: .            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
DUPLICITY: .   File "/nix/store/fq2s2vjvksivwwrq6i5gzlbxkbqsh1a5-duplicity-0.8.23/lib/python3.11/site-packages/duplicity/", line 587, in Write_ROPaths
DUPLICITY: .     ITR(ropath.index, ropath)
DUPLICITY: .   File "/nix/store/fq2s2vjvksivwwrq6i5gzlbxkbqsh1a5-duplicity-0.8.23/lib/python3.11/site-packages/duplicity/", line 364, in __call__
DUPLICITY: .     robust.check_common_error(last_branch.on_error,
DUPLICITY: .   File "/nix/store/fq2s2vjvksivwwrq6i5gzlbxkbqsh1a5-duplicity-0.8.23/lib/python3.11/site-packages/duplicity/", line 49, in check_common_error
DUPLICITY: .     errno.errorcode[exc.errno] in
DUPLICITY: .     ~~~~~~~~~~~~~~~^^^^^^^^^^^
DUPLICITY: .  KeyError: None

What can we do from there? I don’t understand what the error is.

1 Like

Unfortunately, it appears that a bug in error handler obscures the actual error here because it expects error number when there is none. It looks like our duplicity version was until recently over a year old and unmaintained. Could you please try again with duplicity: 0.8.23 -> 2.2.3 by corngood · Pull Request #299405 · NixOS/nixpkgs · GitHub (hoping the error handling got fixed in the meantime).

Sure. What would be the procedure?

I check out the PR you mentioned.

Then, what should I do with that to properly test again?

It is already part of nixos-unstable so no need to check the PR branch, just nixos-unstable. You should quit deja-dup, checkout the nixos-unstable branch in Nixpkgs repo (git pull just to be sure it is recent enough), then nix-build -A deja-dup and run result/bin/deja-dup.

1 Like

I just tried with the new version, but I get the same error. :frowning_face:

I think at this point you should talk to the deja-dup people.

1 Like

Duplicity in this case: Issues · duplicity / duplicity · GitLab


tar can do incremental backups: GNU tar 1.35

I’m using tar to make hourly backups, which are piped through gpg for encryption and through curl for on-the-fly transfer to a remote server over sftp.

The incrementals are based on the last full which means that a full restore only requires the last full backup and the last incremental backup.

A nice feature of tar is that incrementals also contains deletions.

1 Like