New server + restore KO

Hi
I set up a new Ubuntu 22.04 server
Everything went well thanks to the contact/calendar manual fix
When I want to restore my MIAB data, I got this error:

root@srv:/opt# export PASSPHRASE=$(cat secret_key.txt)
root@srv:/opt# sudo -E duplicity restore --force file:///opt/encrypted /opt/xxx/
Restore '/opt/xxx' is not empty or is current_dir.
Will not overwrite.

Do you know how to resolve it please?
Thanks

FYI

root@srv:~# duplicity --version
duplicity 3.2.0.2 August 22, 2026

Hi

What happens if you run the command from /tmp ?

Cheers

that error is duplicity being picky, not the backup being dead.

Restore ‘/opt/xxx’ is not empty or is current_dir means the target already has stuff in it (or you were standing in that folder when you ran it). --force doesnt always override that on duplicity 3.x.

mkdir /opt/restore-empty
cd /tmp
sudo -E duplicity restore file:///opt/encrypted /opt/restore-empty

dont restore straight into /home/user-data on a half-installed box. restore to an empty dir then copy, or wipe the target first if you really want to overwrite.

also if /opt/xxx is just leftover from running it while cwd was that folder, thats the current_dir half of the message.

1 Like

Hi
I tried to extract to another new folder:

export PASSPHRASE=$(cat /opt/secret_key.txt)
sudo -E duplicity restore --force file:///opt/encrypted /opt/NEW
Synchronizing remote metadata to local cache…
Copying duplicity-full-signatures.20260831T2xxx45Z.sigtar.gpg to local cache.
Duplicity backup complete.
GPGError: GPG Failed, see log below:
===== Begin GnuPG log =====
Thread exception: Invalid passphrase
===== End GnuPG log =====

So it seems passphrase is wrong :frowning:
But I took it from secret_key.txt in MIAB folder

As I still have access to the original server, do you now how to reset the encrypted file and perform a new backup with new key file please?