github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/ccl/cmdccl/enc_utils/README.md (about)

     1  This is a small utility to read encrypted rocksdb files.
     2  
     3  
     4  Given a key and a cockroach node started with:
     5  ```
     6  $ openssl rand 48 > aes-128.key 
     7  $ cockroach start \
     8    --enterprise-encryption=path=cockroach-data,key=aes-128.key,old-key=plain
     9  ```
    10  
    11  We can run this utility by pointing it to the key and data directory:
    12  ```
    13  $ go run main.go --db-dir cockroach-data --store-key aes-128.key
    14  I180119 13:40:58.021531 1 ccl/cmdccl/enc_utils/main.go:125  store key: AES128_CTR len: 16
    15  I180119 13:40:58.021575 1 ccl/cmdccl/enc_utils/main.go:77  file registry version: Base
    16  I180119 13:40:58.021594 1 ccl/cmdccl/enc_utils/main.go:92  file registry contains 20 entries
    17  I180119 13:40:58.021612 1 ccl/cmdccl/enc_utils/main.go:198  decrypting COCKROACHDB_DATA_KEYS with AES128_CTR key 74bc2e29...
    18  I180119 13:40:58.021627 1 ccl/cmdccl/enc_utils/main.go:142  data key registry contains 1 data key(s)
    19  I180119 13:40:58.021642 1 ccl/cmdccl/enc_utils/main.go:198  decrypting CURRENT with AES128_CTR key 75b27bcc...
    20  I180119 13:40:58.021650 1 ccl/cmdccl/enc_utils/main.go:151  current: MANIFEST-000008
    21  I180119 13:40:58.021733 1 ccl/cmdccl/enc_utils/main.go:198  decrypting OPTIONS-000005 with AES128_CTR key 75b27bcc...
    22  I180119 13:40:58.021757 1 ccl/cmdccl/enc_utils/main.go:167  options file: OPTIONS-000005 starts with: # This is a RocksDB option file.
    23  #
    24  # For detailed file format spec, please refer to the example file
    25  ```