borg-key-change-passphrase.1 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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-05-22" "" "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]
  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. .SH EXAMPLES
  49. .INDENT 0.0
  50. .INDENT 3.5
  51. .sp
  52. .EX
  53. # Create a key file protected repository
  54. $ borg repo\-create \-\-encryption=keyfile\-aes\-ocb \-v
  55. Initializing repository at \(dq/path/to/repo\(dq
  56. Enter new passphrase:
  57. Enter same passphrase again:
  58. Remember your passphrase. Your data will be inaccessible without it.
  59. Key in \(dq/root/.config/borg/keys/mnt_backup\(dq created.
  60. Keep this key safe. Your data will be inaccessible without it.
  61. Synchronizing chunks cache...
  62. Archives: 0, w/ cached Idx: 0, w/ outdated Idx: 0, w/o cached Idx: 0.
  63. Done.
  64. # Change key file passphrase
  65. $ borg key change\-passphrase \-v
  66. Enter passphrase for key /root/.config/borg/keys/mnt_backup:
  67. Enter new passphrase:
  68. Enter same passphrase again:
  69. Remember your passphrase. Your data will be inaccessible without it.
  70. Key updated
  71. # Import a previously\-exported key into the specified
  72. # key file (creating or overwriting the output key)
  73. # (keyfile repositories only)
  74. $ BORG_KEY_FILE=/path/to/output\-key borg key import /path/to/exported
  75. .EE
  76. .UNINDENT
  77. .UNINDENT
  78. .sp
  79. Fully automated using environment variables:
  80. .INDENT 0.0
  81. .INDENT 3.5
  82. .sp
  83. .EX
  84. $ BORG_NEW_PASSPHRASE=old borg repo\-create \-\-encryption=repokey\-aes\-ocb
  85. # now \(dqold\(dq is the current passphrase.
  86. $ BORG_PASSPHRASE=old BORG_NEW_PASSPHRASE=new borg key change\-passphrase
  87. # now \(dqnew\(dq is the current passphrase.
  88. .EE
  89. .UNINDENT
  90. .UNINDENT
  91. .SH SEE ALSO
  92. .sp
  93. \fIborg\-common(1)\fP
  94. .SH AUTHOR
  95. The Borg Collective
  96. .\" Generated by docutils manpage writer.
  97. .