updating to snapshots

This commit is contained in:
Denise Schannon
2019-03-22 10:23:26 -07:00
parent 45849d1e81
commit c0ead959f5
4 changed files with 91 additions and 91 deletions
+5 -5
View File
@@ -13,7 +13,7 @@ Rancher contains a variety of tools that aren't included in Kubernetes to assist
- [Pipelines](#pipelines)
- [Monitoring](#monitoring)
- [Global DNS](#global-dns)
- [Cluster Backups](#cluster-backups)
- [Snapshots](#Snapshots)
<!-- /TOC -->
@@ -107,12 +107,12 @@ When creating applications that span multiple Kubernetes clusters, a Global DNS
For more information on how to use this feature, see [Global DNS]({{< baseurl >}}/rancher/v2.x/en/tools/globaldns/).
## Cluster Backups
## Snapshots
_Available as v2.2.0_
Using Rancher, you can manage ETCD databases snapshots for Rancher provisioned Kubernetes clusters directly from the UI. Rancher allows you to configure a cluster with recurring local snapshots that will reside on ETCD plane nodes. For more resilience, you can setup snapshots backup to an external S3 compatible provider.
For [Rancher launched Kubernetes clusters]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/), the etcd database can be backed up by enabling the ability to take recurring snapshots. Clusters can be configured to have these snapshots saved locally on the etcd nodes or saved to an external S3 compatible provider.
From the Rancher UI, you will be able to restore your cluster to a previously taken snapshot on an existing set of ETCD nodes. Or if all ETCD nodes are down, you can replace them with the new set of nodes and perform the recovery from the remotely backed up snapshot.
When needed, these snapshots can be used to restore existing set of etcd nodes in your [Rancher launched Kubernetes clusters]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/). If all the etcd nodes are down, a snapshot, that was backed up remotely, can be used on a new set of etcd nodes.
For more information on how to use this feature, see [Cluster Backups]({{< baseurl >}}/rancher/v2.x/en/tools/cluster-backups/).
For more information on how to use this feature, see [Snapshots]({{< baseurl >}}/rancher/v2.x/en/tools/snapshots/).
@@ -1,71 +0,0 @@
---
title: Cluster Backups
weight: 10000
---
_Available as of v2.2.0_
Using Rancher, you can now perform ETCD backup and recovery for Rancher provisioned Kubernetes clusters directly from the UI.
Rancher lets you configure local snapshots on your ETCD plane nodes, as well as setup remote backups to an S3 compatible target which allows you to restore your cluster even if all nodes are lost.
When Cluster Backup is enabled, it's also possible to do one-time snapshots along with configured recurring snapshots.
> **Note:** Cluster Backup is only available for [Rancher provisioned Kubernetes clusters]({{< baseurl >}}rancher/v2.x/en/cluster-provisioning/rke-clusters/) and [Custom Clusters]({{< baseurl >}}rancher/v2.x/en/cluster-provisioning/custom-clusters/).
## Configuring Cluster Backups
As of version 2.0.0, all newly Rancher provisioned Kubernetes clusters have Local Cluster Recurring Snapshots enabled by default. For clusters provisioned with an older versions of Rancher, see [How to enable Cluster backups for existing clusters]({{< baseurl >}}/rancher/v2.x/en/tools/cluster-backups/existing-clusters/)
To configure or disable Cluster Backups, you need to access the Cluster Backup configuration section. This is available during initial cluster configuration or later by editing the cluster.
- While on the **Add Cluster** or **Edit** cluster view, click on **Show advanced options**
- Click on the "Advanced Cluster Options" tab to expand the configuration.
| Option | Description | Default value|
| --- | ---| --- |
|etcd Snapshot Backup Target| Select cluster backup target | local|
|Recurring etcd Snapshot Enabled| Enable/Disable recurring snapshot | Yes|
|Recurring etcd Snapshot Creation Period | Time in hours between recurring| snapshots| 12 hours |
|Recurring etcd Snapshot Retention Count| Number of snapshots to retain| 6 |
## Cluster Backup Targets
Rancher Cluster Backup support two different backup targets:
* [Local Target](#local-target)
* [S3 Target](#s3-target)
## Local Backup Target
Local Backup target is the most basic option. It's enabled by default for all newly Rancher provisioned Kubernetes clusters.
Local Backup target works by saving local ETCD snapshot on all ETCD plane nodes at a pre-configured interval. This provides the user an ability to do point-in-time recovery, or recover from a broken ETCD cluster. However, it doesn't provide the ability to recover if all the ETCD plane nodes are lost, since the snapshots are stored locally on the nodes.
## S3 Backup Target
S3 Backup target allows the user to configure an S3 compatible backend as a remote snapshot storage.
Having the snapshots stored remotely provides a lot of flexibility. In addition to point-in-time recovery and recovering broken ETCD cluster, this targets allows the user to recover the cluster from disaster situations like losing all nodes on the ETCD plane. In other words, it essentially lets the user to replace a broken cluster by restoring from a remote backup.
When S3 target is enabled, additional configuration is required to set it up:
| Option | Description | Required|
|---|---|---|
|S3 Bucket Name| S3 bucket name where backups will be stored| Yes|
|S3 Region|S3 region for the backup bucket|No|
|S3 Region Endpoint|S3 regions endpoint for the backup bucket|Yes|
|S3 Access Key|S3 access key with permission to access the backup bucket|Yes|
|S3 Secret Key|S3 secret key with permission to access the backup bucket|Yes|
## Backing Up Your Cluster
Once backup is enabled for a cluster, the backup controller will automatically start taking snapshots of the cluster ETCD database at the configured intervals.
It's also possible to take one-time snapshots by going to the global cluster view or the cluster view and clicking **Vertical Elipsis (...) > Snapshot Now** for your cluster.
## Listing Backups
You can list all the available snapshots for your cluster by going to the cluster view and clicking **Tools > Snapshots** from the navigation bar.
## Restoring From Backup
You can restore your cluster from backup at any time by going to the global cluster view or the cluster view and clicking **Vertical Elipsis (...) > Restore Snapshot** for your cluster.
A list of available snapshots will be available to choose from. Once you select a snapshot, click **Save**. The cluster will go into `updating` state and the restore process will start.
**Note:** If you are restoring a cluster with unavailable nodes, It's recommended that you delete the nodes from rancher UI before attempting to restore.
**Note:** It's not possible to restore from snapshots saved on S3 if you don't have S3 target configuration enabled on the cluster level. You need to enable S3 target first before trying to restore from a snapshot saved on S3.
@@ -1,15 +0,0 @@
---
title: Upgrading Clusters
weight: 10000
---
## Enabling Cluster Backups For Existing Clusters
Prior to v2.2.0. Legacy RKE based backups were enabled by default. To update your cluster to use Rancher Cluster Backup, you need to apply the following steps:
- Edit your cluster. While in the **Edit** cluster view, click on **Show advanced options**. The UI will show a notice about upgrading the backup configuration for the cluster.
- Click on the "Advanced Cluster Options" tab to expand the configuration.
- Make sure the recurring snapshots are enabled, and the backup configuration are set as needed.
- Save changes to the cluster.
Once your cluster is updated, Cluster backups will be enabled and the first backup will be taken shortly.
@@ -0,0 +1,86 @@
---
title: Snapshots
weight: 10000
---
_Available as of v2.2.0_
In the Rancher UI, etcd backup and recovery for [Rancher launched Kubernetes clusters]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/) can be easily performed. Snapshots of the etcd database are taken and saved either [locally on to the etcd nodes](#test) or to a S3 compatible target. The advantages of configuring S3 is that if all etcd nodes are lost, your snapshot is saved remotely and can be used to restore the cluster.
Rancher recommends enabling the ability to set up recurring snapshots, but one-time snapshots can easily be taken as well.
## Configuring Recurring Snapshots for the Cluster
By default, any [Rancher launched Kubernetes clusters]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/) are enabled to take recurring snapshots that are saved locally. If you have any Rancher launched Kubernetes clusters that were created prior to v2.2.0, you can enable recurring snapshots by editing the existing cluster.
During cluster provisioning or editing the cluster, the configuration about snapshots are in the advanced section for **Cluster Options**. Click on **Show advanced options**.
In the **Advanced Cluster Options** section, there are several options available to configure:
| Option | Description | Default Value|
| --- | ---| --- |
|[etcd Snapshot Backup Target](#snapshot-backup-targets)| Select where you want the snapshots to be saved. Options are either local or in S3 | local|
|Recurring etcd Snapshot Enabled| Enable/Disable recurring snapshots | Yes|
|[Recurring etcd Snapshot Creation Period](#snapshot-creation-period-and-retention-count) | Time in hours between recurring snapshots| 12 hours |
|[Recurring etcd Snapshot Retention Count](#snapshot-creation-period-and-retention-count)| Number of snapshots to retain| 6 |
### Snapshot Backup Targets
Rancher supports two different backup targets:
* [Local Target](#local-backup-target)
* [S3 Target](#s3-backup-target)
#### Local Backup Target
By default, the `local` backup target is selected. The benefits of this option is that there is no external configuration. Snapshots are automatically saved locally to the etcd nodes in the [Rancher launched Kubernetes clusters]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/). All recurring snapshots are taken at configured [intervals](#intervals). The downside of using the `local` backup target is that if there is a total disaster and _all_ etcd nodes are lost, there is no ability to restore the cluster.
#### S3 Backup Target
The `S3` backup target allows users to configure a S3 compatible backend to store the snapshots. The main benefit of this option is that if the cluster loses all the etcd nodes, the cluster can still be restored as the snapshots are stored externally. The downside of using the `S3` backup target is that additional configuration is required in order to have these snapshots saved remotely.
| Option | Description | Required|
|---|---|---|
|S3 Bucket Name| S3 bucket name where backups will be stored| *|
|S3 Region|S3 region for the backup bucket| |
|S3 Region Endpoint|S3 regions endpoint for the backup bucket|* |
|S3 Access Key|S3 access key with permission to access the backup bucket|*|
|S3 Secret Key|S3 secret key with permission to access the backup bucket|*|
### Snapshot Creation Period and Retention Count
Select how often you want recurring snapshots to be taken as well as how many snapshots to keep. The amount of time is measured in hours. With timestamped snapshots, the user has the ability to do a point-in-time recovery.
## One-Time Snapshots
Besides recurring snapshots, you might want to take a one-time snapshot in specific use cases. For example, if you're about to upgrade the Kubernetes version of your cluster, you might want to take a snapshot right before the upgrade.
1. In the **Global** view, navigate to the cluster that you want to take a one-time snapshot.
2. Click the **Vertical Ellipsis (...) > Snapshot Now**.
**Result:** Based on your [snapshot backup target](#snapshot-backup-targets), a one-time snapshot will be taken and saved in the selected backup target.
## Viewing Available snapshots
The list of all available snapshots for the cluster is available.
1. In the **Global** view, navigate to the cluster that you want to view snapshots.
2. Click **Tools > Snapshots** from the navigation bar to view the list of saved snapshots. These snapshots include a timestamp of when they were created.
## Restoring your Cluster from a Snapshot
If your Kubernetes cluster is broken, you can restore the cluster from a snapshot.
1. In the **Global** view, navigate to the cluster that you want to view snapshots.
2. Click the **Vertical Ellipsis (...) > Restore Snapshot**.
3. Select the snapshot that you want to use for restoring your cluster from the dropdown of available snapshots. Click **Save**.
> **Note:** Snapshots from S3 can only be restored from if the cluster is configured to take recurring snapshots on S3.
**Result:** The cluster will go into `updating` state and the process of restoring the `etcd` nodes from the snapshot will start. The cluster is restored when it returns to an `active` state.
> **Note**: If you are restoring a cluster with unavailable etcd nodes, it's recommended that all etcd nodes are removed from Rancher before attempting to restore. For clusters that were provisioned using [nodes hosted in an infrastructure provider]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/node-pools/), new etcd nodes will automatically be created. For [custom clusters]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/custom-nodes/), please ensure that you add new etcd nodes to the cluster.