]> gitweb.fluxo.info Git - hydra.git/commitdiff
Borg fixes as pre-generated keyfiles are currently unsupported
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 17 May 2024 00:12:31 +0000 (21:12 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 17 May 2024 00:12:31 +0000 (21:12 -0300)
docs/backups.md
share/hydra/import-keys
share/hydra/newkeys

index 4cfeff4848fd0744068436fde8e1fd240ca99888..c6121166acbfe90c5a5c75d41fb3c87fa364d141 100644 (file)
@@ -135,7 +135,28 @@ For [Borg][]:
 
 Make sure to cleanup `~/temp/misc/restore` after recovering what you need.
 
+Note on backup keys:
+
+* In the past (before 2024), the Hydra Suite and it's companion [Puppet][]
+  modules used pre-generated [Borg][] repository keys for the sake of automation.
+  This is [not possible anymore][].
+* As it's [important to keep copies of the borg repository key safely
+  elsewhere][], the managed configuration supports OpenPGP-encrypting the
+  repository key and uploading it to the remote repository.
+* This OpenPGP-encrypted key file is named as `keyfile.asc` and is uploaded
+  in the root folder of the remote repository.
+* This OpenPGP-encrypted key file is encrypted and signed with a provided
+  OpenPGP keypair and passphrase (convention is to use the machines's OpenPGP
+  general purpose key, or the machine's role key).
+* This allows the operators to fetch this encrypted keyfile and use their copy
+  of the machine's OpenPGP key to extract the passphrase _on their
+  encrypted-storage workstations_ (recommendation is to not do this on the remote
+  repository).
+
 [Borg]: https://www.borgbackup.org/
+[Puppet]: https://www.puppet.com/
+[not possible anymore]: https://github.com/borgbackup/borg/issues/7047
+[important to keep copies of the borg repository key safely elsewhere]: https://borgbackup.readthedocs.io/en/latest/faq.html#how-important-is-the-home-config-borg-directory
 
 ### eCryptfs
 
index 7339a0d7f6e45bc500ed0594669eb3ab0de920f1..181193086ea2eeb6431ce5987ee16fda0579b025 100755 (executable)
@@ -123,6 +123,14 @@ EOF
 }
 
 # Import Borg key
+#
+# Borg does not support using pre-generated keys anymore (as of 2024-05-16).
+#
+# This code is therefore deprecated, but will stay here for a while, as maybe
+# in the long term borg starts to support this again.
+#
+# Check also https://github.com/borgbackup/borg/issues/7047
+#            https://borgbackup.readthedocs.io/en/latest/faq.html#how-important-is-the-home-config-borg-directory
 function hydra_import_keys_borg {
   if [ "`facter fqdn`" != "$hostname" ]; then
     echo "-----------------------------------------------------"
index deb9b6ea4cf074df613fde02c65b2f5445262430..c53dfe7c413288cc1c88561ff357cf681881b6f9 100755 (executable)
@@ -69,6 +69,13 @@ function hydra_newkeys {
   done
 }
 
+# Borg does not support using pre-generated keys anymore (as of 2024-05-16).
+#
+# This code is therefore deprecated, but will stay here for a while, as maybe
+# in the long term borg starts to support this again.
+#
+# Check also https://github.com/borgbackup/borg/issues/7047
+#            https://borgbackup.readthedocs.io/en/latest/faq.html#how-important-is-the-home-config-borg-directory
 function hydra_newkeys_borg {
   # Check for borg
   #if ! which borg &> /dev/null; then