Skip to content

How to rename a cluster without losing data #13683

Answered by webvictim
Kisuke-CZE asked this question in Q&A
Discussion options

You must be logged in to vote

Unfortunately there is no way to easily change the name of the cluster without losing data. This is because the cluster name is encoded into the identity of the certificate authorities within Teleport and changing it requires them to be regenerated from scratch.

Here's something you can try that might work.

  1. Back up your existing users and roles to a YAML file like this:
sudo tctl get users --with-secrets > /tmp/backup.yaml
echo "---" | sudo tee -A /tmp/backup.yaml
sudo tctl get roles --with-secrets >> /tmp/backup.yaml
  1. Move /var/lib/teleport out of the way to clear your cluster name/database:

sudo mv /var/lib/teleport /var/lib/teleport-old

  1. Start Teleport up again as a fresh cluster, u…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
7 replies
@webvictim
Comment options

@jullianow
Comment options

@webvictim
Comment options

@jullianow
Comment options

@tukusejssirs
Comment options

Answer selected by Kisuke-CZE
Comment options

You must be logged in to vote
1 reply
@webvictim
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants