Backup and Restore¶
Sometimes things go wrong, a disk crashes, a CPU burns, someone unplugs a network cable and you end up with one or more servers going down.
Depending on your TraefikEE setup, this might put you in the delicate situation of having to deal with a cluster with not enough control nodes to reach a quorum.
In that specific case, the TraefikEE control plane will stop working and you will have to perform a cluster recovery.
Keep in mind that if your data plane is up, it will continue to handle traffic even if the control plane is down.
Fortunately, TraefikEE comes with a fully featured backup and restore system that will get you out of trouble in no time.
Backing up a TraefikEE Cluster¶
TraefikEE enables you to create a copy of the current state of your cluster, which includes:
- Your license
- Deployed certificates
- The ACME account being used to get Let's Encrypt certificates if enabled
- The current deployed configuration
- Configured entrypoints
- Enabled configuration providers
Those backups are saved as archives, which can be either
As you might have guessed, those backups can contain sensitive information, so you should store them securely.
Backup frequently and automatically
We strongly recommend you to backup your TraefikEE cluster automatically on a daily basis.
Backup storage is important
Make sure to use fault tolerant systems to store your backups, and to setup frequent automatic backups.
To perform a backup you have two options:
traefikeectlcomes with a backup command that connects to the TraefikEE cluster, collects the backup archive securely and writes it on the local filesystem.
traefikeebinary comes also with a backup command, but it requires access to the traefikeectl API socket, and a writable filesystem.
Restoring a Cluster from a Backup¶
To restore a backup, you will have to perform a new installation of a TraefikEE cluster. Depending on the platform, you have the following options:
- For Kubernetes and Swarm, the
traefikeectl installcommand comes with a handy
--archivepathoption which tells
traefikeectlto perform a cluster restoration from the given archive.
- For an on premise installation, the
traefikee bootstrapcommand has the very same
--archivepathoption. However, it requires having the archive available on the file system where the
traefikee bootstrapcommand is executed.
We don't support restoring a backup on an already running cluster.
To avoid downtime on a "crashed" cluster, we recommend the following steps:
- Do not stop your current cluster (if it still has up and running data nodes, it can serve traffic).
- Install a new TraefikEE cluster using your backup, side by side with the current.
- Redirect traffic to the new installation when it is ready.
- Tear down the old crashed cluster.