- Add 3 backup modes: LV→LV, LV→Raw, VG→Raw - Simple GUI with mode selection and dynamic target lists - Command-line version with clear mode support - Enhanced drive listing with mode-specific options - Minimal logic: just snapshot → copy → cleanup - No complex migration features that cause system issues - Supports refreshing existing backups and creating fresh ones
2.9 KiB
Simple LVM Backup System
A much simpler, safer approach to LVM backups.
After issues with complex backup systems, this is a return to basics:
- Simple LVM snapshot creation
- Direct block-level copy with dd/pv
- Minimal logic, maximum reliability
What This Does
- Creates an LVM snapshot of your source volume
- Copies it block-for-block to your target drive
- Cleans up the snapshot when done
That's it. No complex migration logic, no fancy features that can break.
Quick Start
1. See what's available
sudo ./list_drives.sh
2. Run a simple backup
sudo ./simple_backup.sh /dev/your-vg/your-lv /dev/your-target-drive
3. Or use the GUI
sudo python3 simple_backup_gui.py
Examples
Backup your root volume to an external SSD:
sudo ./simple_backup.sh /dev/internal-vg/root /dev/sdb
Backup your home volume:
sudo ./simple_backup.sh /dev/internal-vg/home /dev/nvme1n1
Important Notes
⚠️ WARNING: The target drive will be completely overwritten!
- Always run as root (
sudo) - Target device will lose ALL existing data
- Make sure target device is unmounted before backup
- The backup is a complete block-level clone
- You need at least 1GB free space in your volume group for the snapshot
How It Works
This is exactly what happens, no hidden complexity:
lvcreate -L1G -s -n backup_snap /dev/vg/lv- Create snapshotpv /dev/vg/backup_snap | dd of=/dev/target bs=4M- Copy datalvremove -f /dev/vg/backup_snap- Remove snapshot
Files
simple_backup.sh- Command-line backup scriptsimple_backup_gui.py- Simple GUI versionlist_drives.sh- Helper to show available drives
Why This Approach?
The previous complex scripts had too much logic and caused system issues. This approach:
- ✅ Uses standard LVM commands
- ✅ Minimal chance of errors
- ✅ Easy to understand and debug
- ✅ Does exactly what you expect
- ✅ No hidden "smart" features
Recovery
To boot from your backup:
- Connect the external drive
- Boot from it directly, or
- Use it as a recovery drive to restore your system
Requirements
- LVM-enabled system
- Root access
- Python 3 + tkinter (for GUI)
pvcommand (optional, for progress display)
If Something Goes Wrong
The script will try to clean up snapshots automatically. If it fails:
# List any remaining snapshots
sudo lvs | grep snap
# Remove manually if needed
sudo lvremove /dev/vg/snapshot_name
No More Complex Features
This system intentionally does NOT include:
- Automatic drive detection with complex logic
- Migration between different LVM setups
- Boot repair or GRUB handling
- Multiple backup formats
- Configuration files
- Complex error handling
If you need those features, use dedicated tools like CloneZilla or Borg Backup.
This is for simple, reliable block-level LVM backups. Nothing more, nothing less.