On Feb 04 2019, Chris Davies <[email protected]> wrote:
> Hello,
>
> I have a working S3QL filesystem with all the known passphrases (i.e. my 
> authinfo2 is uptodate and correct). Unfortunately I cannot find my record 
> of the master key, which I know I took at the time of creation.
>
> Is it possible to retrieve it?

Not out of the box. But if you look at src/s3ql/mkfs.py, you can see
that it's just the base64 encoded contents of the s3ql_passphrase
object. So you could probably copy and paste the code elsewhere to get
it printed by eg. fsck.

Something like this:

diff --git a/src/s3ql/common.py b/src/s3ql/common.py
index 3d08b..3a6fb 100644
--- a/src/s3ql/common.py
+++ b/src/s3ql/common.py
@@ -325,6 +325,14 @@ def get_backend_factory(options):
                 raise QuietError('File system revision needs upgrade '
                                  '(or backend data is corrupted)', exitcode=32)
 
+    print('Please store the following master key in a safe location. It allows 
',
+          'decryption of the S3QL file system in case the storage objects 
holding ',
+          'this information get corrupted:',
+          '---BEGIN MASTER KEY---',
+          ' '.join(split_by_n(b64encode(data_pw).decode(), 4)),
+          '---END MASTER KEY---',
+          sep='\n')
+
     return lambda: ComprencBackend(data_pw, compress, 
options.backend_class(options))
 
 def pretty_print_size(i):


HTH,
-Nikolaus

-- 
GPG Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«

-- 
You received this message because you are subscribed to the Google Groups 
"s3ql" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to