File size: 2,344 Bytes
d086025 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | # Backup & Recovery Guide
> Protect your Guts node data with comprehensive backup procedures.
## Overview
Guts nodes store several types of data that should be backed up:
| Data Type | Location | Frequency | Priority |
|-----------|----------|-----------|----------|
| Node Key | `/etc/guts/node.key` | Once | **Critical** |
| Configuration | `/etc/guts/config.yaml` | On change | High |
| Data Directory | `/var/lib/guts/` | Daily | High |
| Consensus State | `/var/lib/guts/consensus/` | Hourly | Medium |
## What to Backup
### Critical: Node Identity
The node key is your node's identity. **Loss means losing your node identity.**
### High Priority: Configuration
### High Priority: Data Directory
Contains all Git objects, repository metadata, and collaboration data.
## Backup Methods
### Method 1: Snapshot Backup (Recommended)
Uses built-in backup command for consistent snapshots:
### Method 2: File System Backup
For LVM or ZFS environments:
For ZFS:
### Method 3: Hot Backup (No Downtime)
### Method 4: Continuous Replication
For near-zero RPO requirements:
## Automated Backup Script
Create `/usr/local/bin/guts-backup.sh`:
### Schedule with Cron
### Schedule with Systemd Timer
## Restore Procedures
### Scenario 1: Same Server, New Disk
### Scenario 2: New Server, Same Identity
### Scenario 3: Disaster Recovery (Full Resync)
When backup is unavailable, resync from the network:
## Backup Verification
### Verify Backup Integrity
### Test Restore
Periodically test restores to a temporary location:
## Recovery Time Objectives
| Scenario | RTO Target | Procedure |
|----------|------------|-----------|
| Node restart | < 1 min | `systemctl restart guts-node` |
| Restore from local backup | < 30 min | Full restore |
| Restore from S3 | < 1 hour | Download + restore |
| Full resync from network | < 4 hours | Depends on data size |
## Recovery Point Objectives
| Backup Frequency | RPO | Storage Cost |
|------------------|-----|--------------|
| Daily | 24 hours | Low |
| Hourly | 1 hour | Medium |
| Continuous (WAL) | Minutes | High |
## Monitoring Backups
### Alert on Backup Failure
### Backup Metrics
## Related Documentation
- [Upgrade Procedures](upgrades.md)
- [Disaster Recovery Runbook](../runbooks/data-corruption.md)
- [Monitoring Guide](monitoring.md)
|