Conghao97's picture tcftrees's picture
ProgramGen release
d086025
|
Raw History Blame Contribute Delete
2.34 kB

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