From f9d9ca35a91e2437f03418a47f81d931fcf62aea Mon Sep 17 00:00:00 2001 From: jwierzbo Date: Tue, 4 Apr 2023 09:39:57 +0200 Subject: [PATCH] [Documentation] Manual recovery documentation (#1281) --- CHANGELOG.md | 1 + docs/design/README.md | 2 +- docs/design/recovery.md | 270 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 272 insertions(+), 1 deletion(-) create mode 100644 docs/design/recovery.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 774a981b9..a41c0013b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ - (Improvement) Add new field to CR for more precise calculation of DC2DC replication progress - (Maintenance) Bump GO Modules - (Feature) Optional Graceful Restart +- (Maintenance) Manual Recovery documentation ## [1.2.24](https://github.com/arangodb/kube-arangodb/tree/1.2.24) (2023-01-25) - (Bugfix) Fix deployment creation on ARM64 diff --git a/docs/design/README.md b/docs/design/README.md index d07d5e8e4..3503802fe 100644 --- a/docs/design/README.md +++ b/docs/design/README.md @@ -16,4 +16,4 @@ - [Configuring timezone](./configuring_tz.md) - [Operator API](./api.md) - [Logging](./logging.md) - +- [Manual Recovery](./recovery.md) diff --git a/docs/design/recovery.md b/docs/design/recovery.md new file mode 100644 index 000000000..7b1a14c86 --- /dev/null +++ b/docs/design/recovery.md @@ -0,0 +1,270 @@ +# Manual Recovery + +## Overview +Let's consider a situation where we had a ArangoDeployment in Cluster mode (3 DbServers, 3 Coordinators, 3 Agents) +with Local storage attached (only one K8s Node in the K8s cluster). + +Due to some reason the ArangoDeployment was deleted (e.g. ETCD storage has been wiped out) and we want to recover it. +Fortunately, we have a backup of the data on the disk. + +To recover the ArangoDeployment we need to: +1. Create PV and PVC for each member with persistent storage (agent, dbservers, single) +2. Create a new ArangoDeployment with the same members IDs + +## Local storage data + +We have a members (Agents & DbServers) data in the following directories: +```bash +> ls -1 /var/data/ +f9rs2htwc9e0bzme +fepwdnnbf0keylgx +gqnkahucthoaityt +vka6ic19qcl1y3ec +rhlf8vixbsbewefo +rlzl467vfgsdpofu +``` + +To find out the name of the members to which data should be attached, +we need to check the `UUID` file content in each directory: +```bash +> cat /var/data/*/UUID +AGNT-pntg5yc8 +AGNT-kfyuj8ow +AGNT-bv5rofcz +PRMR-9xztmg4t +PRMR-l1pp19yl +PRMR-31akmzrp +``` + +## Initial ArangoDeployment + +Here is an example of the initial ArangoDeployment before deletion: +```yaml +cat <