borg-key-change-passphrase.1 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .
  4. .nr rst2man-indent-level 0
  5. .
  6. .de1 rstReportMargin
  7. \\$1 \\n[an-margin]
  8. level \\n[rst2man-indent-level]
  9. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  10. -
  11. \\n[rst2man-indent0]
  12. \\n[rst2man-indent1]
  13. \\n[rst2man-indent2]
  14. ..
  15. .de1 INDENT
  16. .\" .rstReportMargin pre:
  17. . RS \\$1
  18. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  19. . nr rst2man-indent-level +1
  20. .\" .rstReportMargin post:
  21. ..
  22. .de UNINDENT
  23. . RE
  24. .\" indent \\n[an-margin]
  25. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  26. .nr rst2man-indent-level -1
  27. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  28. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  29. ..
  30. .TH "BORG-KEY-CHANGE-PASSPHRASE" "1" "2025-04-18" "" "borg backup tool"
  31. .SH NAME
  32. borg-key-change-passphrase \- Change repository key file passphrase
  33. .SH SYNOPSIS
  34. .sp
  35. borg [common options] key change\-passphrase [options] [REPOSITORY]
  36. .SH DESCRIPTION
  37. .sp
  38. The key files used for repository encryption are optionally passphrase
  39. protected. This command can be used to change this passphrase.
  40. .sp
  41. Please note that this command only changes the passphrase, but not any
  42. secret protected by it (like e.g. encryption/MAC keys or chunker seed).
  43. Thus, changing the passphrase after passphrase and borg key got compromised
  44. does not protect future (nor past) backups to the same repository.
  45. .SH OPTIONS
  46. .sp
  47. See \fIborg\-common(1)\fP for common options of Borg commands.
  48. .SS arguments
  49. .sp
  50. REPOSITORY
  51. .SH EXAMPLES
  52. .INDENT 0.0
  53. .INDENT 3.5
  54. .sp
  55. .EX
  56. # Create a key file protected repository
  57. $ borg init \-\-encryption=keyfile \-v /path/to/repo
  58. Initializing repository at \(dq/path/to/repo\(dq
  59. Enter new passphrase:
  60. Enter same passphrase again:
  61. Remember your passphrase. Your data will be inaccessible without it.
  62. Key in \(dq/root/.config/borg/keys/mnt_backup\(dq created.
  63. Keep this key safe. Your data will be inaccessible without it.
  64. Synchronizing chunks cache...
  65. Archives: 0, w/ cached Idx: 0, w/ outdated Idx: 0, w/o cached Idx: 0.
  66. Done.
  67. # Change key file passphrase
  68. $ borg key change\-passphrase \-v /path/to/repo
  69. Enter passphrase for key /root/.config/borg/keys/mnt_backup:
  70. Enter new passphrase:
  71. Enter same passphrase again:
  72. Remember your passphrase. Your data will be inaccessible without it.
  73. Key updated
  74. # Import a previously\-exported key into the specified
  75. # key file (creating or overwriting the output key)
  76. # (keyfile repositories only)
  77. $ BORG_KEY_FILE=/path/to/output\-key borg key import /path/to/repo /path/to/exported
  78. .EE
  79. .UNINDENT
  80. .UNINDENT
  81. .sp
  82. Fully automated using environment variables:
  83. .INDENT 0.0
  84. .INDENT 3.5
  85. .sp
  86. .EX
  87. $ BORG_NEW_PASSPHRASE=old borg init \-e=repokey repo
  88. # now \(dqold\(dq is the current passphrase.
  89. $ BORG_PASSPHRASE=old BORG_NEW_PASSPHRASE=new borg key change\-passphrase repo
  90. # now \(dqnew\(dq is the current passphrase.
  91. .EE
  92. .UNINDENT
  93. .UNINDENT
  94. .SH SEE ALSO
  95. .sp
  96. \fIborg\-common(1)\fP
  97. .SH AUTHOR
  98. The Borg Collective
  99. .\" Generated by docutils manpage writer.
  100. .