Issues fixed:
1. Source widget now correctly switches between combobox and listbox
2. Mode changes properly refresh and show correct source options
3. Added better logging to track widget switches
4. Clear selections when switching modes
5. Force UI update after widget changes
Now:
- LV modes (lv_to_borg, files_to_borg) show multi-select listbox
- VG modes (vg_to_borg) show single-select combobox
- Widget switching works correctly when changing modes
- Borg settings appear for all Borg modes
The refresh_drives method was incorrectly showing VGs for all modes.
Now correctly shows:
- LVs for: lv_to_lv, lv_to_raw, lv_to_borg, files_to_borg
- VGs for: vg_to_raw, vg_to_borg
This fixes the issue where users couldn't select individual LVs.
Fixes:
1. Files → Borg mode now shows Borg settings panel
2. LV → Borg and Files → Borg modes support multi-selection
Multi-LV Selection:
- Replace single combobox with multi-select listbox for LV modes
- Hold Ctrl/Cmd to select multiple logical volumes
- Backup all selected LVs sequentially in one operation
- Shows progress for each LV individually
- Continues with remaining LVs if one fails
- Summary report at the end
Benefits:
- No need to start separate backup processes manually
- Repository initialized once, used for all LVs
- Better deduplication across multiple LVs
- Clear progress tracking and error reporting
- Time-efficient for backing up multiple volumes
GUI Changes:
- Dynamic source selection widget (combobox vs listbox)
- Helper text explaining multi-selection
- Improved confirmation dialogs showing all selected LVs
- Enhanced progress reporting for multi-LV operations
Perfect for backing up boot, root, home, etc. in one go!
Perfect for data volumes like home partitions that are nearly full.
New mode: Files → Borg
- Creates LVM snapshot (consistent point-in-time state)
- Mounts snapshot to temporary location
- Borg backs up actual files (not empty blocks)
- Unmounts and cleans up snapshot
Benefits vs block-level backup:
- Space efficient: 305GB files vs 358GB entire LV
- Better compression: Borg works on real file data
- Superior deduplication: File-content based
- No snapshot space issues: Shorter operation time
- Easier file recovery: Browse/restore individual files
Use cases:
- Block-level: System volumes (root, boot) for exact state
- File-level: Data volumes (home) for space efficiency
GUI: Added 'Files → Borg' mode
CLI: Added 'files-to-borg' mode
Example:
sudo ./enhanced_simple_backup.sh files-to-borg /dev/internal-vg/home /repo --new-repo
This solves the 90% full home partition backup problem!
Problem: Fixed 500MB snapshot size was too small for large/active LVs,
causing I/O errors when snapshot space was exhausted during backup.
Solution: Calculate appropriate snapshot size based on LV size:
- Use 10% of LV size for snapshot space
- Minimum 1GB to handle reasonable activity
- Shows snapshot size in logs for transparency
Example:
- 20GB LV → 2GB snapshot
- 100GB LV → 10GB snapshot
- 500MB LV → 1GB snapshot (minimum)
This prevents snapshot overflow and resulting I/O errors during backup.
Changes:
- GUI: Calculate snapshot size before creating
- CLI: Same dynamic sizing logic
- Both show calculated snapshot size in output
- Handles both single LV and VG backup modes
Problem: VG→Borg was creating temp files for all LVs simultaneously,
causing 'no space left' errors when LVs are large.
Solution: Process LVs sequentially instead of simultaneously:
1. Create snapshot for one LV
2. Stream it directly to Borg (no temp files)
3. Remove snapshot immediately
4. Move to next LV
Changes:
- VG→Borg now creates separate archives per LV instead of one big archive
- Each LV gets its own archive: vg_internal-vg_lv_root_20241009_123456
- No temporary files needed - direct streaming
- Space-efficient: only one snapshot exists at a time
- More robust: failure of one LV doesn't affect others
Benefits:
- No more space issues regardless of LV sizes
- Faster cleanup between LVs
- Individual LV recovery possible
- Better error isolation
- Still preserves block-level backup benefits
BREAKING CHANGE: Borg backups now store raw block devices instead of files
Changes:
- LV→Borg: Stores snapshot as raw block device (.img file) in Borg
- VG→Borg: Stores each LV as separate .img files in Borg repository
- No more file-level mounting - preserves exact block-level state
- Uses dd | borg create --stdin-name for LV backups
- Creates temporary .img files for VG backups
- Maintains all filesystem metadata, boot sectors, etc.
- Better deduplication for similar block patterns
Benefits:
- Exact block-level restoration possible
- Preserves all filesystem metadata
- Better suited for system/boot volume backups
- Still gets Borg's compression, deduplication, encryption
- Clear difference between LV and VG modes
Now LV→Borg and VG→Borg have distinct, useful purposes:
- LV→Borg: Single logical volume as one block device
- VG→Borg: All logical volumes as separate block devices
- 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
- Move all old complex backup scripts to old_scripts/
- Archive previous documentation versions
- Clean up temporary files and debian packages
- Update README to focus on new simple system
- Keep only the enhanced simple backup system in main directory
Main directory now contains only:
- simple_backup_gui.py (GUI interface)
- enhanced_simple_backup.sh (CLI interface)
- list_drives.sh (helper)
- simple_backup.sh (basic CLI)
- SIMPLE_BACKUP_README.md (detailed docs)
- README.md (project overview)
- 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
- Fixed partition size calculation bugs in migrate_to_lvm.sh
- Added comprehensive error handling for USB drive stability
- Optimized data copy operations using cp -a for better performance
- Corrected mount point detection for encrypted home partitions
- Enhanced drive detection and exclusion logic
- Added proper size override mechanisms for manual intervention
- Improved filesystem creation and validation processes
- Complete toolset for external M.2 drive migration scenarios
Tested successfully on:
- Debian 13 Trixie Live USB environment
- 476GB external M.2 drives via USB 3.0
- Complex partition layouts (root/home/EFI + encryption)
- Large data transfers (314GB+ encrypted home directories)
- Added smart sync backup feature using rsync for incremental updates
- Implemented change analysis to recommend sync vs full clone
- Added GUI buttons for 'Smart Sync Backup' and 'Analyze Changes'
- Enhanced CLI with --sync and --analyze flags
- Smart sync provides 10-100x speed improvement for minor changes
- Maintains full system consistency while eliminating downtime
- Updated documentation with comprehensive smart sync guide
- All existing backup/restore functionality preserved