-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: JENNIFER RONDEAU <jrondeau@heptio.com>
- Loading branch information
JENNIFER RONDEAU
committed
Nov 14, 2018
1 parent
25590a8
commit fa14255
Showing
5 changed files
with
79 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Disaster recovery | ||
|
||
*Using Schedules and Restore-Only Mode* | ||
|
||
If you periodically back up your cluster's resources, you are able to return to a previous state in case of some unexpected mishap, such as a service outage. Doing so with Heptio Ark looks like the following: | ||
|
||
1. After you first run the Ark server on your cluster, set up a daily backup (replacing `<SCHEDULE NAME>` in the command as desired): | ||
|
||
``` | ||
ark schedule create <SCHEDULE NAME> --schedule "0 7 * * *" | ||
``` | ||
This creates a Backup object with the name `<SCHEDULE NAME>-<TIMESTAMP>`. | ||
1. A disaster happens and you need to recreate your resources. | ||
1. Update the Ark server deployment, adding the argument for the `server` command flag `restore-only` set to `true`. This prevents Backup objects from being created or deleted during your Restore process. | ||
1. Create a restore with your most recent Ark Backup: | ||
``` | ||
ark restore create --from-backup <SCHEDULE NAME>-<TIMESTAMP> | ||
``` | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Cluster migration | ||
|
||
*Using Backups and Restores* | ||
|
||
Heptio Ark can help you port your resources from one cluster to another, as long as you point each Ark instance to the same cloud object storage location. In this scenario, we are also assuming that your clusters are hosted by the same cloud provider. **Note that Heptio Ark does not support the migration of persistent volumes across cloud providers.** | ||
|
||
1. *(Cluster 1)* Assuming you haven't already been checkpointing your data with the Ark `schedule` operation, you need to first back up your entire cluster (replacing `<BACKUP-NAME>` as desired): | ||
|
||
``` | ||
ark backup create <BACKUP-NAME> | ||
``` | ||
The default TTL is 30 days (720 hours); you can use the `--ttl` flag to change this as necessary. | ||
1. *(Cluster 2)* Add the `--restore-only` flag to the server spec in the Ark deployment YAML. | ||
1. *(Cluster 2)* Make sure that the `BackupStorageLocation` and `VolumeSnapshotLocation` CRDs match the ones from *Cluster 1*, so that your new Ark server instance points to the same bucket. | ||
1. *(Cluster 2)* Make sure that the Ark Backup object is created. Ark resources are synchronized with the backup files in cloud storage. | ||
``` | ||
ark backup describe <BACKUP-NAME> | ||
``` | ||
**Note:** As of version 0.10, the default sync interval is 1 minute, so make sure to wait before checking. You can configure this interval with the `--backup-sync-period` flag to the Ark server. | ||
1. *(Cluster 2)* Once you have confirmed that the right Backup (`<BACKUP-NAME>`) is now present, you can restore everything with: | ||
``` | ||
ark restore create --from-backup <BACKUP-NAME> | ||
``` | ||
## Verify both clusters | ||
Check that the second cluster is behaving as expected: | ||
1. *(Cluster 2)* Run: | ||
``` | ||
ark restore get | ||
``` | ||
1. Then run: | ||
``` | ||
ark restore describe <RESTORE-NAME-FROM-GET-COMMAND> | ||
``` | ||
If you encounter issues, make sure that Ark is running in the same namespace in both clusters. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.