#3541 Issue closed: Recover with duplicity broken in ReaR 2.6 and higher

Labels: bug

gdha opened issue at 2025-12-01 08:18:

ReaR version

2,6

Describe the ReaR bug in detail

  • In ReaR 2.6 recovering with duplicity will fail because it still relies on python v2 and today we are using python v3 on most modern OSes. Therefore, the site packages of python v3 were not present.

  • In Rear 2.9 and higher we have a variable PYTHON_INTERPRETER to find the current python version and this can copy all belonging site packages too. However, in ReaR 2,6 this is missing!

  • Trying duplicity recover as well in ReaR master code and this parameter (PYTHON_INTERPRETER) does its job properly. But still the recovery failed because of missing quotes around an important variable setting --gpg-options --cipher-algo AES. It should be correted to --gpg-options "--cipher-algo AES"
    The missing quotes issue was there already from the very beginning of this duplicity code. Strange nobody reported it before?

Platform

Linux x64

OS version

EL9

Backup

No response

Storage layout

# lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,LABEL,SIZE,MOUNTPOINT
NAME                           KNAME     PKNAME    TRAN   TYPE FSTYPE      LABEL  SIZE MOUNTPOINT
/dev/sr0                       /dev/sr0            sata   rom                    1024M 
/dev/vda                       /dev/vda                   disk                      8G 
|-/dev/vda1                    /dev/vda1 /dev/vda         part xfs                  1G /boot
`-/dev/vda2                    /dev/vda2 /dev/vda         part LVM2_member          7G 
  |-/dev/mapper/almalinux-root /dev/dm-0 /dev/vda2        lvm  xfs                6.2G /
  `-/dev/mapper/almalinux-swap /dev/dm-1 /dev/vda2        lvm  swap               820M [SWAP]

What steps will reproduce the bug?

BACKUP=DUPLICITY
DUPLICITY_USER=root
DUPLICITY_HOST=192.168.122.1
DUPLICITY_PROTO="rsync"
DUPLICITY_PATH=/apps/export/ReaR
BACKUP_DUPLICITY_URL="${DUPLICITY_PROTO}://${DUPLICITY_USER}@${DUPLICITY_HOST}/${DUPLICITY_PATH}"
# Duplicity options
BACKUP_DUPLICITY_MAX_SETS_KEEP_FULL="3"
BACKUP_DUPLICITY_MAX_TIME="1Y"
BACKUP_DUPLICITY_GPG_OPTIONS="--cipher-algo AES"
BACKUP_DUPLICITY_GPG_ENC_KEY="<hidden>"
BACKUP_DUPLICITY_GPG_ENC_PASSPHRASE="<hidden>"
# To ask the passphrase on restore, set the following variable to true:
BACKUP_DUPLICITY_ASK_PASSPHRASE="true"
BACKUP_DUPLICITY_TEMP_RAMDISK="true"
BACKUP_DUPLICITY_EXCLUDE=( '/proc' '/sys' '/run' '/var/lib/ntp/proc' "$HOME/.cache" '/tmp' '/var/tmp' '/app' '/var/app' )
# We need rear-2.9 (or higher) to have PYTHON_INTERPRETER=true working!
PYTHON_INTERPRETER=true

Workaround, if any

--gpg-options "${BACKUP_DUPLICITY_GPG_OPTIONS}" should become --gpg-options \""${BACKUP_DUPLICITY_GPG_OPTIONS}"\"

Additional information

No response

pcahyna commented at 2025-12-01 11:08:

  • The missing quotes issue was there already from the very beginning of this duplicity code. Strange nobody reported it before?

Hi @gdha , have you found the issue with actual use of Duplicity, or just experimenting? I wonder whether DUPLICITY should be added to the list of deprecated backup methods ( #3428 ) if nobody has noticed breakage until now.


[Export of Github issue for rear/rear.]