2
0

key.rst 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. .. include:: key_export.rst.inc
  2. .. include:: key_import.rst.inc
  3. .. _borg-change-passphrase:
  4. .. include:: key_change-passphrase.rst.inc
  5. Examples
  6. ~~~~~~~~
  7. ::
  8. # Create a key file protected repository
  9. $ borg init --encryption=keyfile -v /path/to/repo
  10. Initializing repository at "/path/to/repo"
  11. Enter new passphrase:
  12. Enter same passphrase again:
  13. Remember your passphrase. Your data will be inaccessible without it.
  14. Key in "/root/.config/borg/keys/mnt_backup" created.
  15. Keep this key safe. Your data will be inaccessible without it.
  16. Synchronizing chunks cache...
  17. Archives: 0, w/ cached Idx: 0, w/ outdated Idx: 0, w/o cached Idx: 0.
  18. Done.
  19. # Change key file passphrase
  20. $ borg key change-passphrase -v /path/to/repo
  21. Enter passphrase for key /root/.config/borg/keys/mnt_backup:
  22. Enter new passphrase:
  23. Enter same passphrase again:
  24. Remember your passphrase. Your data will be inaccessible without it.
  25. Key updated
  26. Fully automated using environment variables:
  27. ::
  28. $ BORG_NEW_PASSPHRASE=old borg init -e=repokey repo
  29. # now "old" is the current passphrase.
  30. $ BORG_PASSPHRASE=old BORG_NEW_PASSPHRASE=new borg key change-passphrase repo
  31. # now "new" is the current passphrase.