Encrypted Incremental Backups with duplicity

Create GPG-encrypted, incremental backups of your folders to a local disk or remote storage, and verify that the backup restores correctly.

LinuxbackupduplicitysecurityencryptionLow risk
Run duplicity --encrypt-key YOUR_KEY_ID ~/Documents file:///mnt/backup/docs to back up encrypted, and add --verify to confirm the copy is readable.

01Command

Command
$ duplicity --encrypt-key YOUR_GPG_KEY_ID ~/Documents file:///mnt/backup/docs && duplicity --encrypt-key YOUR_GPG_KEY_ID --verify file:///mnt/backup/docs ~/Documents

02What it does

Duplicity encrypts every backup volume with GnuPG before it leaves your machine, so data is unreadable on the destination — important for USB drives, network shares or cloud storage you don't fully trust. Backups are incremental: only changed data transfers after the first run, making repeated runs fast. Verification with --verify is the step most people skip; it restores and compares the files so you know the archive is actually usable before you need it.

03Risk

RiskLow risk
Requirementsduplicity and gnupg (sudo apt install duplicity / sudo dnf install duplicity); a GPG key for encryption
!Warning: Encrypted backups are only as recoverable as your GPG key: lose the private key or passphrase and the data is gone forever — keep a copy of the key somewhere safe, and schedule regular --verify runs.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Duplicity — Debian Wiki
    Debian · community · 2026-09-17
    Evidence: Debian's documentation on using duplicity for encrypted incremental backups, including GPG key setup and restore examples.
  • duplicity(1) — Linux manual page
    Arch Linux · community · 2026-09-17
    Evidence: Duplicity produces encrypted tar-format volumes with GnuPG and uploads them to local or remote backends; --encrypt-key selects the key, --verify compares restored files against the source.

Last verified: 2026-09-18 · Category: Security & Privacy

06Related solutions