Skip to content

Conversation

@officiallyutso
Copy link
Member

Overview

This PR introduces a comprehensive unified backup and restore system for Linux distributions, enabling seamless system migration and distro hopping. The implementation includes encrypted key backup, dotfile management, package replication, and automation file handling.

Features Added

Core Backup & Restore System

  • Unified Backup: Complete system backup in single encrypted tarball containing keys, dotfiles, packages, and automation files
  • System Restore: Full restoration with decryption, file placement, and package installation script generation
  • AES-256-GCM Encryption: Secure encryption for SSH/GPG keys with random key generation
  • Permission Preservation: Maintains original file permissions during backup/restore

Automation Support

  • SystemD Services: Detection and backup of custom services in /etc/systemd/system/
  • SystemD Timers: Backup and restoration of custom timers
  • Cronjobs: Support for both user and system cron jobs
  • Automation Restoration: Integration with package installation scripts

Key Components

  • UnifiedBackupManager: Handles complete system backup with encryption
  • RestoreManager: Manages system restoration with decryption
  • AutomationManager: Detects and backs up automation files
  • EncryptionConfig: AES-256-GCM encryption with random keys

Documentation

  • Complete README with usage instructions
  • encryption and file formats
  • Project structure documentation

- Implemented unified_backup.go for complete system backup (keys, dotfiles, packages) in single encrypted tarball
- Added 
estore.go for secure restoration of keys, dotfiles, and package lists
- Updated �ackup_integration.go with RunUnifiedBackup() and RunRestore() functions (legacy compatibility retained)
- Updated 
un.go menu with new options:
  1. Complete system backup
  2. Restore system from backup
  3–5. Existing individual backup functions and a bit of mdg touch
- Enhanced 	arball.go to support unified backup exports
- Backup process now uses AES-256-GCM encryption and preserves permissions
- Restore generates package reinstall script (dist/restored_packages_install.sh) and proper instructions for our userds
- Maintains backward compatibility with existing backup options
@officiallyutso officiallyutso added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request labels Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants