tarsnap-keymgmt.1-mdoc 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. .\" Copyright 2008-2025 Tarsnap Backup Inc.
  2. .\" All rights reserved.
  3. .\"
  4. .Dd @DATE@
  5. .Dt TARSNAP-KEYMGMT 1
  6. .Os
  7. .Sh NAME
  8. .Nm tarsnap-keymgmt
  9. .Nd generate subsets of
  10. .Xr tarsnap 1
  11. key files
  12. .Sh SYNOPSIS
  13. .Nm
  14. .Fl -outkeyfile Ar new-key-file
  15. .Op Fl r
  16. .Op Fl w
  17. .Op Fl d
  18. .Op Fl -nuke
  19. .Op Fl -passphrased
  20. .Op Fl -passphrase-mem Ar maxmem
  21. .Op Fl -passphrase-time Ar maxtime
  22. .Ar key-file ...
  23. .Nm
  24. .Fl -print-key-id Ar key-file
  25. .Nm
  26. .Fl -print-key-permissions Ar key-file
  27. .Nm
  28. .Fl -version
  29. .Sh DESCRIPTION
  30. .Nm
  31. reads the provided key files and writes a new key file
  32. (specified by
  33. .Fl -outkeyfile Ar new-key-file )
  34. containing only the keys required for the operations
  35. specified via the
  36. .Fl r
  37. (list and extract archives),
  38. .Fl w
  39. (write archives),
  40. .Fl d
  41. (delete archives), and
  42. .Fl -nuke
  43. flags.
  44. Note that
  45. .Fl d
  46. implies
  47. .Fl r
  48. since it is impossible to delete an individual archive without
  49. being able to read it; while a key file generated with
  50. .Fl -nuke
  51. can be used to delete all the archives stored, but not individual
  52. archives.
  53. .Pp
  54. The following list shows which permissions are required for various
  55. .Xr tarsnap 1
  56. .Em command modes .
  57. .Bl -tag -width 4n -offset 4n
  58. .It Em --recover
  59. requires either (1)
  60. .Fl d
  61. (archive deleting), (2)
  62. .Fl w
  63. (archive creating), or (3)
  64. .Fl -nuke
  65. keys.
  66. .It Em --fsck
  67. requires either (1) both
  68. .Fl w
  69. (archive writing) and
  70. .Fl r
  71. (archive reading) keys, or (2)
  72. .Fl d
  73. (archive deleting) keys.
  74. .It Em --fsck-prune
  75. requires
  76. .Fl d
  77. (archive deleting) keys, since it needs to be able to delete
  78. corrupted archives.
  79. .El
  80. .Pp
  81. If the
  82. .Fl -passphrased
  83. option is specified, the user will be prompted to enter a passphrase (twice)
  84. to be used to encrypt the key file.
  85. .Pp
  86. If the
  87. .Fl -passphrase-mem Ar maxmem
  88. option is specified, a maximum of
  89. .Ar maxmem
  90. bytes of RAM will be used in the scrypt key derivation function to
  91. encrypt the key file; it may be necessary to set this option if a key
  92. file is being created on a system with far more RAM than the system
  93. on which the key file will be used.
  94. .Pp
  95. If the
  96. .Fl -passphrase-time Ar maxtime
  97. option is specified, a maximum of approximately
  98. .Ar maxtime
  99. seconds will be used in the scrypt key derivation function to encrypt
  100. the key file.
  101. .Pp
  102. Note that if none of the
  103. .Fl w ,
  104. .Fl r ,
  105. .Fl d ,
  106. or
  107. .Fl -nuke
  108. options are specified, a key file will be produced which does not
  109. contain any keys.
  110. This is probably not very useful.
  111. .Pp
  112. The
  113. .Fl -print-key-id Ar key-file
  114. option displays the 64-bit integer corresponding to the key's machine number.
  115. This may be useful for scripts or GUIs which manage a user's Tarsnap account,
  116. but is not likely to be helpful for command-line use.
  117. .Pp
  118. The
  119. .Fl -print-key-permissions Ar key-file
  120. option displays the permissions which the key possesses.
  121. .Pp
  122. The
  123. .Fl -version
  124. option prints the version number of
  125. .Nm ,
  126. then exits.