rke2-datastore-backup

Configure RKE2 datastore snapshots, S3 replication, and cluster-reset restore procedures.

2|Updated Jul 22, 2026
One-click install
npx skills add https://github.com/dydx/rke2-skills --skill rke2-datastore-backup-dydx
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rke2-datastore-backup
Source: https://github.com/dydx/rke2-skills/tree/main/skills/rke2-datastore-backup
Command: npx skills add https://github.com/dydx/rke2-skills --skill rke2-datastore-backup-dydx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? RKE2 cluster operators need reliable guidance for backing up and restoring Kubernetes datastore state, whether using embedded etcd, embedded SQLite, or external databases like MySQL, PostgreSQL, or etcd, especially during disaster recovery and quorum-loss events. ## Core Features & Use Cases - Snapshot Management: Configure scheduled and on-demand etcd snapshots with retention, compression, and S3-compatible object store replication via flags or a Kubernetes Secret. - Disaster Recovery Runbooks: Step-by-step cluster-reset restore procedures for single-server and multi-server clusters, including restores from S3, restores to new hosts with the original token, and quorum-loss recovery. - Datastore Selection Guidance: Compare embedded etcd, embedded SQLite, and external etcd/MySQL/MariaDB/PostgreSQL options, including HA support, quorum math, and connection endpoint formats. - Use Case: An operator loses quorum on a three-server RKE2 cluster. Use this Skill to run the cluster-reset restore on one node, wipe peer db directories, rejoin the remaining servers, and clean up stale Node resources. ## Quick Start Ask how to restore an RKE2 cluster from an etcd snapshot stored in S3 after losing quorum on a multi-server cluster.

Frequently Asked Questions about rke2-datastore-backup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I restore an RKE2 cluster from an etcd snapshot?▼

Stop rke2-server, then run rke2 server with --cluster-reset and --cluster-reset-restore-path pointing to the snapshot. After the reset message appears, start rke2-server normally; on multi-server clusters, wipe the db directory on peer nodes before restarting them.

How do I back up RKE2 etcd snapshots to S3?▼

Enable S3 replication with the --etcd-s3 flag plus bucket, access key, and secret key flags, or store the configuration in a kube-system Secret of type etcd.k3s.cattle.io/s3-config-secret. Both scheduled and on-demand snapshots are then replicated to the S3-compatible store.

Does rke2 etcd-snapshot work with an external datastore?▼

No, the rke2 etcd-snapshot tooling only works with embedded etcd. When using datastore-endpoint with external etcd, MySQL, MariaDB, or PostgreSQL, backups are handled outside RKE2 using native database dump and snapshot tools.

How many RKE2 server nodes should I run for etcd quorum?▼

Run an odd number of server nodes: 1, 3, or 5. Three servers tolerate one failure and five tolerate two; even counts add no fault tolerance and increase the risk of split quorum.

Why does RKE2 restore fail when restoring to a new host?▼

The snapshot's bootstrap data is encrypted with the original server token, so you must pass the backed-up token value via --token during the restore. Without the original token from /var/lib/rancher/rke2/server/token, the snapshot is unusable.

Can I restore an RKE2 snapshot taken on an older version?▼

Yes, the restoring RKE2 does not need to match the exact version that took the snapshot. The same minor version or a higher minor version is acceptable for the restore.