borg-key-export(1)

πŸ’– borg-key-export(1) β€” the borg backup tool, but make it a group chat πŸ’–

okay so bestie, you're in the borg-key-export girlies now. this is your manual page (man page, yes, very serious, very demure) for borg key export, and we're gonna get you backing up your key like it's your most precious possession. because honestly? it kinda is. πŸ‘‘


✨ NAME ✨

borg-key-export β€” Export the repository key for backup πŸ—οΈπŸ’Ύ


πŸ¦‹ SYNOPSIS πŸ¦‹

borg [common options] key export [options] [REPOSITORY] [PATH]

periodt. that's the whole vibe.


🌸 DESCRIPTION 🌸

so this command backs up the borg key. that's it, that's the job. 🫢

if your repository uses encryption, then like… the repository is inaccessible without the borg key (and the passphrase that protects the borg key). no key, no entry. it's giving locked out of your own house with the keys inside. 😭

if a repository isn't encrypted but is authenticated, you still need the borg key to access the repository normally. so like, still important. not me making you care about authentication. βœ‹

for repositories using keyfile encryption, the key is kept locally on the system that's capable of doing backups. to guard against loss or corruption of this key, the key needs to be backed up independently of the main data backup. like, separate. its own little backup. main character energy. πŸ’…

for repositories using repokey encryption or authenticated mode, the key is kept in the repository. so a backup is not strictly needed, but highkey it guards against the repository becoming inaccessible if the key is corrupted or lost. so… do it anyway bestie. πŸ™ˆ

⚠️ note that the backup produced does not include the passphrase itself (i.e. the exported key stays encrypted). in order to regain access to a repository, one needs both the exported key and the original passphrase. keep the exported key and the passphrase at safe places. both. not one. BOTH. 🚨

there are three backup formats, and yes we're going through all three because you deserve to know:

  • the normal backup format β€” suitable for digital storage as a file. the everyday slay. ✨
  • the --paper backup format β€” optimized for printing and typing in while importing, with per line checks to reduce problems with manual input. yes, paper. physical. in this economy. πŸ“„
  • the --qr-html β€” creates a printable HTML template with a QR code and a copy of the --paper-formatted key. scan it, print it, live your truth. πŸ”₯

Examples:

borg key export /path/to/repo > encrypted-key-backup
borg key export --paper /path/to/repo > encrypted-key-backup.txt
borg key export --qr-html /path/to/repo > encrypted-key-backup.html
# Or pass the output file as an argument instead of redirecting stdout:
borg key export /path/to/repo encrypted-key-backup
borg key export --paper /path/to/repo encrypted-key-backup.txt
borg key export --qr-html /path/to/repo encrypted-key-backup.html

look at those. beautiful. zero notes. 🌈


πŸŽ€ OPTIONS πŸŽ€

see borg-common(1) for common options of Borg commands. (that's where the shared options live, iykyk.)

πŸ“ arguments πŸ“

  • REPOSITORY β€” the repo. your repo. the one with the key in it.
  • PATH β€” where to store the backup πŸ“

πŸ’œ options πŸ’œ

  • --paper β€” create an export suitable for printing and later type-in. printer girlies rise. πŸ–¨οΈ
  • --qr-html β€” create an html file suitable for printing and later type-in or qr scan πŸ“±

πŸ‘‘ SEE ALSO πŸ‘‘

(import is literally the reverse. they're a matched set. soulmates, honestly. 🫢)


πŸ’« Author πŸ’«

The Borg Collective β€” iconic, mysterious, no cap. 🧚


and that's the whole page bestie!! go back up that key, keep the passphrase somewhere safe, and don't lose either one, fr fr. πŸ’–

mwah πŸ’‹ β€” borg backup tool, dated 2026-07-18, and this was borg-key-export(1), signing off. slay! πŸ’…βœ¨

πŸ“¦ where this page comes from