brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: duplicati-cli find shows what is inside a Duplicati backup without the web UI

Backup
~/tips/tip-duplicati-cli-find-restore

duplicati-cli find "file:///mnt/backup/duplicati" --passphrase="..."

Lists backup versions and files from the command line, and restores them to a folder you pick.

The Duplicati web UI is fine until the machine that runs it is the thing that died. Then the command line tool is how you get to your files from anywhere.

On Linux and macOS it is duplicati-cli, on Windows Duplicati.CommandLine.exe. Every command takes the storage URL of the backup:

duplicati-cli find "file:///mnt/backup/duplicati" --passphrase="..."

With no file name, find lists the backup versions. Give it a full path and it lists every version of that file. File names are treated as filters, and --all-versions searches all versions, not just the newest.

Restoring works the same way:

duplicati-cli restore "file:///mnt/backup/duplicati" "/home/me/docs/*" \
  --restore-path=/tmp/restore --version=2 --passphrase="..."

--restore-path sends the files to a separate folder, so nothing is overwritten by accident. --version picks an older version. With no file name, or *, the docs say everything is restored.

Two more I’d know before I need them: duplicati-cli help advanced lists every option, and list-broken-files reports which remote files are missing or damaged, and what can no longer be restored. --dry-run works on all commands.

Caveat: you need the passphrase. Without it an encrypted backup is just noise, so keep it in a password manager, not only in the Duplicati database of the machine you are backing up. The passphrase can also come from the PASSPHRASE environment variable, which keeps it out of your shell history.

Further reading: Duplicati command line interface

Going deeper: Back up your Unraid appdata with Duplicati, and rehearse the restore before you need it

More Backup tips restic snapshots --group-by host,paths mysqldump --routines --events mydb > mydb.sql rsync -a --files-from=list.txt /home/me/ backup:/backup/ restic find "*.txt" restic stats All Backup tips (45) All topics

Link