Add disaster-recovery.md
This commit is contained in:
42
disaster-recovery.md
Normal file
42
disaster-recovery.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# 🚨 Disaster Recovery Plan (DRP)
|
||||
|
||||
## 📋 Prerequisites
|
||||
1. New Linode Instance (Ubuntu 22.04).
|
||||
2. Linode Object Storage Access Keys (Access/Secret).
|
||||
3. Cloudflare Tunnel Token.
|
||||
|
||||
## 🏃 Recovery Steps
|
||||
|
||||
### 1. Install Docker & Rclone
|
||||
```bash
|
||||
curl -fsSL [https://get.docker.com](https://get.docker.com) -o get-docker.sh && sh get-docker.sh
|
||||
sudo apt install rclone -y
|
||||
```
|
||||
|
||||
### 2. Configure Storage & Pull Backups
|
||||
Configure rclone config to point to linode-s3. Then pull the latest data:
|
||||
```bash
|
||||
mkdir -p /opt/docker/backups/recovery
|
||||
rclone copy linode-s3:davisdre-backups-chicago/daily /opt/docker/backups/recovery --latest-only
|
||||
```
|
||||
### 3. Restore Global Database
|
||||
Start the global-db container with an empty volume.
|
||||
Restore the SQL dump:
|
||||
```bash
|
||||
gunzip -c /opt/docker/backups/recovery/postgres_full_DATE.sql.gz | docker exec -i global_postgres psql -U postgres
|
||||
```
|
||||
### 4. Restore App Files
|
||||
Extract the application data to their respective folders:
|
||||
```bash
|
||||
# Note: Ensure the paths in the tar match your /opt/docker structure
|
||||
tar -xzf /opt/docker/backups/recovery/app_files_DATE.tar.gz -C /
|
||||
```
|
||||
### 5. Launch Services
|
||||
```bash
|
||||
cd /opt/docker/dashboard && docker compose up -d
|
||||
cd /opt/docker/gitea && docker compose up -d
|
||||
cd /opt/docker/linkwarden && docker compose up -d
|
||||
cd /opt/docker/freshrss && docker compose up -d
|
||||
cd /opt/docker/memos && docker compose up -d
|
||||
cd /opt/docker/surmai && docker compose up -d
|
||||
```
|
||||
Reference in New Issue
Block a user