317 lines
3.0 KiB
Markdown
317 lines
3.0 KiB
Markdown
# Backups
|
|
|
|
## Overview
|
|
|
|
This document describes the backup strategy for SilverLinux.
|
|
|
|
The goal is to ensure that all critical services can be restored after hardware failure, accidental deletion, corruption, or disaster recovery scenarios.
|
|
|
|
---
|
|
|
|
## Backup Priorities
|
|
|
|
### Critical
|
|
|
|
These items must always be backed up.
|
|
|
|
#### PostgreSQL
|
|
|
|
Contains:
|
|
|
|
* OpenProject database
|
|
* Gitea database
|
|
* Future application databases
|
|
|
|
Importance:
|
|
|
|
Critical
|
|
|
|
---
|
|
|
|
#### Gitea Data
|
|
|
|
Location:
|
|
|
|
```text
|
|
/srv/docker/gitea/data
|
|
```
|
|
|
|
Contains:
|
|
|
|
* Git repositories
|
|
* Attachments
|
|
* Configuration
|
|
* User data
|
|
|
|
Importance:
|
|
|
|
Critical
|
|
|
|
---
|
|
|
|
#### OpenProject Assets
|
|
|
|
Location:
|
|
|
|
```text
|
|
/srv/docker/openproject/assets
|
|
```
|
|
|
|
Contains:
|
|
|
|
* Attachments
|
|
* Uploaded files
|
|
* User generated content
|
|
|
|
Importance:
|
|
|
|
Critical
|
|
|
|
---
|
|
|
|
#### Shared Secrets
|
|
|
|
Location:
|
|
|
|
```text
|
|
/srv/secrets/company.env
|
|
```
|
|
|
|
Contains:
|
|
|
|
* SMTP credentials
|
|
* PostgreSQL passwords
|
|
* OpenProject secrets
|
|
* Future OAuth secrets
|
|
|
|
Importance:
|
|
|
|
Critical
|
|
|
|
Without this file applications may not start correctly.
|
|
|
|
---
|
|
|
|
#### Nginx Proxy Manager
|
|
|
|
Locations:
|
|
|
|
```text
|
|
/srv/docker/nginx-proxy-manager/data
|
|
/srv/docker/nginx-proxy-manager/letsencrypt
|
|
```
|
|
|
|
Contains:
|
|
|
|
* Proxy configuration
|
|
* SSL certificates
|
|
* Domain routing
|
|
|
|
Importance:
|
|
|
|
Critical
|
|
|
|
---
|
|
|
|
### Medium Priority
|
|
|
|
#### Portainer
|
|
|
|
Volume:
|
|
|
|
```text
|
|
portainer_portainer_data
|
|
```
|
|
|
|
Contains:
|
|
|
|
* Portainer users
|
|
* Portainer configuration
|
|
* Stack definitions
|
|
|
|
Importance:
|
|
|
|
Medium
|
|
|
|
Can be recreated if necessary.
|
|
|
|
---
|
|
|
|
#### Jitsi Configuration
|
|
|
|
Location:
|
|
|
|
```text
|
|
/srv/docker/jitsi
|
|
```
|
|
|
|
Contains:
|
|
|
|
* Jitsi configuration
|
|
* Internal authentication configuration
|
|
|
|
Importance:
|
|
|
|
Medium
|
|
|
|
---
|
|
|
|
#### BaGet Data
|
|
|
|
Location:
|
|
|
|
```text
|
|
/srv/docker/baget/data
|
|
```
|
|
|
|
Contains:
|
|
|
|
* Hosted NuGet packages
|
|
* SQLite database
|
|
|
|
Importance:
|
|
|
|
Medium
|
|
|
|
---
|
|
|
|
#### Gitea Actions Runner Configuration
|
|
|
|
Location:
|
|
|
|
```text
|
|
/srv/docker/gitea-runner
|
|
```
|
|
|
|
Contains:
|
|
|
|
* Runner deployment configuration
|
|
* Runner state
|
|
|
|
The registration token is stored separately in `/srv/secrets/company.env`.
|
|
|
|
Importance:
|
|
|
|
Medium
|
|
|
|
---
|
|
|
|
## Backup Storage
|
|
|
|
Current Location:
|
|
|
|
```text
|
|
/srv/backups
|
|
```
|
|
|
|
Suggested Structure:
|
|
|
|
```text
|
|
/srv/backups/
|
|
├── daily
|
|
├── weekly
|
|
└── monthly
|
|
```
|
|
|
|
---
|
|
|
|
## Retention Policy
|
|
|
|
### Daily
|
|
|
|
Keep:
|
|
|
|
```text
|
|
7 days
|
|
```
|
|
|
|
### Weekly
|
|
|
|
Keep:
|
|
|
|
```text
|
|
4 weeks
|
|
```
|
|
|
|
### Monthly
|
|
|
|
Keep:
|
|
|
|
```text
|
|
12 months
|
|
```
|
|
|
|
---
|
|
|
|
## Restore Priorities
|
|
|
|
Restore order:
|
|
|
|
1. PostgreSQL
|
|
2. Shared secrets
|
|
3. Nginx Proxy Manager
|
|
4. Gitea
|
|
5. OpenProject
|
|
6. Portainer
|
|
7. Jitsi
|
|
8. BaGet
|
|
9. Gitea Actions Runner
|
|
|
|
---
|
|
|
|
## Disaster Recovery Checklist
|
|
|
|
### Step 1
|
|
|
|
Install:
|
|
|
|
* Ubuntu Server
|
|
* Docker
|
|
* Docker Compose
|
|
|
|
### Step 2
|
|
|
|
Restore:
|
|
|
|
```text
|
|
/srv/secrets/company.env
|
|
```
|
|
|
|
### Step 3
|
|
|
|
Restore:
|
|
|
|
```text
|
|
/srv/docker
|
|
```
|
|
|
|
data directories.
|
|
|
|
### Step 4
|
|
|
|
Restore PostgreSQL databases.
|
|
|
|
### Step 5
|
|
|
|
Deploy Docker stacks.
|
|
|
|
### Step 6
|
|
|
|
Verify:
|
|
|
|
* DNS
|
|
* SSL certificates
|
|
* Email delivery
|
|
* Application access
|
|
|
|
---
|
|
|
|
## Related Documentation
|
|
|
|
* docs/server.md
|
|
* docs/security.md
|
|
* docs/secrets.md
|
|
* postgres/README.md
|
|
* gitea/README.md
|
|
* openproject/README.md
|