Skip to content

Commit 75566c6

Browse files
authored
Merge pull request #1038 from Bradamant3/issue-819
add draft content for docs issue 819
2 parents 25590a8 + fa14255 commit 75566c6

5 files changed

+79
-58
lines changed

docs/disaster-case.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Disaster recovery
2+
3+
*Using Schedules and Restore-Only Mode*
4+
5+
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:
6+
7+
1. After you first run the Ark server on your cluster, set up a daily backup (replacing `<SCHEDULE NAME>` in the command as desired):
8+
9+
```
10+
ark schedule create <SCHEDULE NAME> --schedule "0 7 * * *"
11+
```
12+
This creates a Backup object with the name `<SCHEDULE NAME>-<TIMESTAMP>`.
13+
14+
1. A disaster happens and you need to recreate your resources.
15+
16+
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.
17+
18+
1. Create a restore with your most recent Ark Backup:
19+
```
20+
ark restore create --from-backup <SCHEDULE NAME>-<TIMESTAMP>
21+
```
22+
23+
24+

docs/migration-case.md

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Cluster migration
2+
3+
*Using Backups and Restores*
4+
5+
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.**
6+
7+
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):
8+
9+
```
10+
ark backup create <BACKUP-NAME>
11+
```
12+
The default TTL is 30 days (720 hours); you can use the `--ttl` flag to change this as necessary.
13+
14+
1. *(Cluster 2)* Add the `--restore-only` flag to the server spec in the Ark deployment YAML.
15+
16+
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.
17+
18+
1. *(Cluster 2)* Make sure that the Ark Backup object is created. Ark resources are synchronized with the backup files in cloud storage.
19+
20+
```
21+
ark backup describe <BACKUP-NAME>
22+
```
23+
24+
**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.
25+
26+
1. *(Cluster 2)* Once you have confirmed that the right Backup (`<BACKUP-NAME>`) is now present, you can restore everything with:
27+
28+
```
29+
ark restore create --from-backup <BACKUP-NAME>
30+
```
31+
32+
## Verify both clusters
33+
34+
Check that the second cluster is behaving as expected:
35+
36+
1. *(Cluster 2)* Run:
37+
38+
```
39+
ark restore get
40+
```
41+
42+
1. Then run:
43+
44+
```
45+
ark restore describe <RESTORE-NAME-FROM-GET-COMMAND>
46+
```
47+
48+
If you encounter issues, make sure that Ark is running in the same namespace in both clusters.

docs/output-file-format.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ rootBucket/
1515

1616
## Example backup JSON file
1717

18-
```
18+
```json
1919
{
2020
"kind": "Backup",
2121
"apiVersion": "ark.heptio.com/v1",

docs/troubleshooting.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
These tips can help you troubleshoot known issues. If they don't help, you can [file an issue][4], or talk to us on the [#ark-dr channel][25] on the Kubernetes Slack server.
44

5+
See also:
6+
7+
- [Debug installation/setup issues][2]
8+
- [Debug restores][1]
9+
510
## General troubleshooting information
611

712
In `ark` version >= `0.1.0`, you can use the `ark bug` command to open a [Github issue][4] by launching a browser window with some prepopulated values. Values included are OS, CPU architecture, `kubectl` client and server versions (if available) and the `ark` client version. This information isn't submitted to Github until you click the `Submit new issue` button in the Github UI, so feel free to add, remove or update whatever information you like.
@@ -14,7 +19,7 @@ Some general commands for troubleshooting that may be helpful:
1419
* `ark restore logs <restoreName>` - fetch the logs for this specific restore. Useful for viewing failures and warnings, including resources that could not be restored.
1520
* `kubectl logs deployment/ark -n heptio-ark` - fetch the logs of the Ark server pod. This provides the output of the Ark server processes.
1621

17-
## Getting ark debug logs
22+
### Getting ark debug logs
1823

1924
You can increase the verbosity of the Ark server by editing your Ark deployment to look like this:
2025

@@ -40,10 +45,6 @@ Because of how Kubernetes handles Service objects of `type=LoadBalancer`, when y
4045

4146
Alternatively, you might be able to use the Service's `spec.loadBalancerIP` field to keep connections valid, if your cloud provider supports this value. See [the Kubernetes documentation about Services of Type LoadBalancer](https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer).
4247

43-
## [Debug installation/setup issues][2]
44-
45-
## [Debug restores][1]
46-
4748
## Miscellaneous issues
4849

4950
### Ark reports `custom resource not found` errors when starting up.

docs/use-cases.md

-52
This file was deleted.

0 commit comments

Comments
 (0)