.\" Man page generated from reStructuredText .\" by the Docutils 0.22.4 manpage writer. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "borg-key-export-related-secrets" "1" "2026-07-18" "" "borg backup tool" .SH Name borg-key-export-related-secrets \- Export secrets for creating related repositories .SH SYNOPSIS .sp borg [common options] key export\-related\-secrets [options] [REPOSITORY] [PATH] .SH DESCRIPTION .sp This command exports the deduplication secrets (\fBid_key\fP and \fBchunk_seed\fP) of a repository. These secrets can be used to initialize a \fBrelated repository\fP\&. .sp Related repositories share the same deduplication metadata but have their own independent encryption keys. This is useful for: .INDENT 0.0 .IP 1. 3 Creating independent backup targets that still benefit from being \(dqcompatible\(dq for future archive transfers. .IP 2. 3 Preparing for a migration to Borg 2.0, where archives can be transferred between related repositories using \fBborg transfer\fP\&. .UNINDENT .sp The exported secrets are stored in a JSON file. This file contains sensitive information and should be deleted immediately after usage. .sp Examples: .INDENT 0.0 .INDENT 3.5 .sp .EX # Export secrets from an existing repository $ borg key export\-related\-secrets /path/to/repo1 secrets.json # Initialize a new related repository using these secrets $ borg init \-\-import\-related\-secrets=secrets.json \-\-encryption=repokey /path/to/repo2 $ rm secrets.json .EE .UNINDENT .UNINDENT .sp \fBImportant:\fP .INDENT 0.0 .INDENT 3.5 When initializing a related repository using \fBborg init \-\-import\-related\-secrets\fP, the new repository must use the same ID hash algorithm (either both HMAC\-SHA256 or both BLAKE2) as the original repository. .INDENT 0.0 .IP \(bu 2 HMAC\-SHA256: \fBrepokey\fP, \fBkeyfile\fP, \fBauthenticated\fP .IP \(bu 2 BLAKE2: \fBrepokey\-blake2\fP, \fBkeyfile\-blake2\fP, \fBauthenticated\-blake2\fP .UNINDENT .UNINDENT .UNINDENT .sp \fBWarning:\fP .INDENT 0.0 .INDENT 3.5 Please note that future Borg 2.0 versions might remove support for BLAKE2 in new repositories (see #8867). .UNINDENT .UNINDENT .SH OPTIONS .sp See \fIborg\-common(1)\fP for common options of Borg commands. .SS arguments .sp REPOSITORY .INDENT 0.0 .TP .B PATH where to store the secrets .UNINDENT .SH SEE ALSO .sp \fIborg\-common(1)\fP .SH Author The Borg Collective .\" End of generated man page.