How to Configure the secret-key-path for DM

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: DM的secret-key-path该如何配置

| username: h5n1

[TiDB Version] 8.1.0
dmctl encrypt requires configuring secret-key-path
[tidb@tgypt-xx13d002-cs76w conf]$ dmctl encrypt “abcded”
Error: secret key is not initialized

Using tiup dm edit-config to configure the master server parameter results in an error

Modifying the toml file in the conf directory to add secret-key-path = “/path/to/secret/key”, after reloading, the file content disappears again

Last login: Thu May 30 17:31:22 2024
[tidb@tgypt-xx13d002-cs76w ~]$ dmctl --version
Release Version: v8.1.0
Git Commit Hash: 137ed650cc3fcd04ed31b4e7978dccebc087330d
Git Branch: HEAD
UTC Build Time: 2024-05-20 13:04:17
Go Version: go version go1.21.10 linux/arm64
Failpoint Build: false

tiup dm display dm_test
Starting component dm: /home/tidb/.tiup/components/dm/v1.15.1/tiup-dm display dm_test
Cluster type: dm
Cluster name: dm_test
Cluster version: v8.1.0
Deploy user: tidb
SSH type: builtin

| username: h5n1 | Original post link

Configure as follows:

  secret-key-path: /xx/xx/keyfile