[go: up one dir, main page]

Unable to resume full backup to backblaze B2 after SIGTERM

I have:

  • searched https://gitlab.com/duplicity/duplicity/-/issues for similar issues. If you find a similar issue and the issue is still open, add a comment to the existing issue instead of opening a new one. If you find a Closed issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one.
  • tested that this issue still occurs on the latest stable snap (install instructions: https://snapcraft.io/duplicity), please include the snap version (snap info duplicity | grep installed) output: installed: x.xx.xx (xx)
  • ideally, tested that this issue still occurs on the latest edge snap, if you can test without risking your data. Please include the snap version output: installed: x.xx.xx (xx)

Summary

On attempting to continue a (new) full backup which I had to SIGTERM earlier when travelling, I get the following error 100% of the time. I can't find this when searching the duplicity codebase, and can't work out what this is being caused by.

I'm backing up to backblaze B2 and signing and encrypting with PGP keys.

RESTART: Volumes 925 to 925 failed to upload before termination.
         Restarting backup at volume 925.
Attempt of get Nr. 1 failed. TypeError: argument should be a str object or an os.PathLike object returning str, not <class 'bytes'>
Attempt of get Nr. 2 failed. TypeError: argument should be a str object or an os.PathLike object returning str, not <class 'bytes'>
Attempt of get Nr. 3 failed. TypeError: argument should be a str object or an os.PathLike object returning str, not <class 'bytes'>
Attempt of get Nr. 4 failed. TypeError: argument should be a str object or an os.PathLike object returning str, not <class 'bytes'>
Giving up after 5 attempts. TypeError: argument should be a str object or an os.PathLike object returning str, not <class 'bytes'>

This command (which runs first) works fine:

duplicity \
  --sign-key ${SGN_KEY_ID} --encrypt-key ${ENC_KEY_ID} \
  remove-older-than ${MAX_AGE} --force \
  ${B2_URL}

But this command fails:

duplicity --progress \
    ${INCLUDES_LIST} \
    --exclude '**' \
    --sign-key ${SGN_KEY_ID} --encrypt-key ${ENC_KEY_ID} \
    --full-if-older-than 30D \
    ${BACKUP_DIR} ${B2_URL}

Environment

/ > uname -a        
Linux anaximander 6.2.2-arch2-1 #1 SMP PREEMPT_DYNAMIC Wed, 08 Mar 2023 04:07:29 +0000 x86_64 GNU/Linux
/ > duplicity --version
duplicity 1.2.1

Steps to reproduce

Start full backup with the following

duplicity --progress \
    ${INCLUDES_LIST} \
    --exclude '**' \
    --sign-key ${SGN_KEY_ID} --encrypt-key ${ENC_KEY_ID} \
    --full-if-older-than 30D \
    ${BACKUP_DIR} ${B2_URL}

What is the current bug behaviour?

RESTART: Volumes 925 to 925 failed to upload before termination.
         Restarting backup at volume 925.
Attempt of get Nr. 1 failed. TypeError: argument should be a str object or an os.PathLike object returning str, not <class 'bytes'>
Attempt of get Nr. 2 failed. TypeError: argument should be a str object or an os.PathLike object returning str, not <class 'bytes'>
Attempt of get Nr. 3 failed. TypeError: argument should be a str object or an os.PathLike object returning str, not <class 'bytes'>
Attempt of get Nr. 4 failed. TypeError: argument should be a str object or an os.PathLike object returning str, not <class 'bytes'>
Giving up after 5 attempts. TypeError: argument should be a str object or an os.PathLike object returning str, not <class 'bytes'>

What is the expected correct behaviour?

I would expect the backup to resume where it left off.

Possible fixes

I couldn't actually find where in the duplicity codebase this is happening so can't be very helpful here.

Edited by Gideon Farrell