key.rst 1.2 KB

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