feat: Add Borg Backup support to simple LVM backup system

- Add LV → Borg and VG → Borg backup modes
- GUI: Borg settings panel with repo path, encryption, passphrase
- CLI: Enhanced script with Borg options (--new-repo, --encryption, --passphrase)
- Automatic repository initialization for new repos
- Support for all Borg encryption modes (none, repokey, keyfile)
- Mount snapshots temporarily for file-level Borg backups
- Comprehensive cleanup of snapshots and mount points
- Updated documentation and examples

Benefits:
- Deduplication and compression
- Strong encryption support
- Incremental backups capability
- Space-efficient storage
- Still maintains simple snapshot → backup → cleanup workflow
This commit is contained in:
root
2025-10-09 00:37:17 +02:00
parent 72f9838f55
commit 179a84e442
4 changed files with 566 additions and 35 deletions

View File

@@ -1,4 +1,4 @@
# Enhanced Simple LVM Backup System
# Enhanced Simple LVM Backup System with Borg Support
A reliable, straightforward backup system for LVM-enabled Linux systems. Born from the need for simple, dependable backups without complex logic that can cause system issues.
@@ -6,22 +6,24 @@ A reliable, straightforward backup system for LVM-enabled Linux systems. Born fr
**Simple is better.** This system does exactly three things:
1. Create LVM snapshot
2. Copy data with dd/pv
2. Copy data (dd/pv for raw, Borg for repositories)
3. Clean up snapshot
No complex migration logic, no fancy features that can break. Just reliable backups.
## Features
### Three Backup Modes
### Five Backup Modes
- **LV → LV**: Update existing logical volume backups
- **LV → Raw**: Create fresh backups on raw devices
- **VG → Raw**: Clone entire volume groups with LVM metadata
- **LV → Borg**: Backup logical volume to Borg repository (deduplicated, compressed, encrypted)
- **VG → Borg**: Backup entire volume group to Borg repository
### Two Interfaces
- **GUI**: `simple_backup_gui.py` - User-friendly interface
- **GUI**: `simple_backup_gui.py` - User-friendly interface with Borg configuration
- **CLI**: `enhanced_simple_backup.sh` - Command-line power user interface
## Quick Start
@@ -53,6 +55,15 @@ sudo ./enhanced_simple_backup.sh vg-to-raw internal-vg /dev/sdb
sudo python3 simple_backup_gui.py
```
**Borg repository backups:**
```bash
# Create new Borg repo and backup LV
sudo ./enhanced_simple_backup.sh lv-to-borg /dev/internal-vg/root /path/to/borg/repo --new-repo --encryption repokey --passphrase mypass
# Backup entire VG to existing repo
sudo ./enhanced_simple_backup.sh vg-to-borg internal-vg /path/to/borg/repo --passphrase mypass
```
## Files
### Core System
@@ -71,6 +82,7 @@ sudo python3 simple_backup_gui.py
- Root access (`sudo`)
- Python 3 + tkinter (for GUI)
- `pv` command (optional, for progress display)
- **Borg Backup** (for Borg modes): `sudo apt install borgbackup`
## Safety Features