BORG_PASSPHRASE="secret" borg list /backup/repo

Category: Backup & Restore

BORG_PASSPHRASE="secret" borg list /backup/repo

Run borg with the passphrase inline

Sets the BORG_PASSPHRASE environment variable for this one command so borg does not prompt. Fine for interactive use; in scripts, prefer reading the passphrase from a file or command so it never sits in shell history. The passphrase must match the repository's.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.