Automated backup and restore solution for Linux development environments. Backs up packages, development environments, IDE (VS Code) settings, and configurations.
- ✅ APT & SNAP packages - Complete system package backup
- ✅ Conda environments - Full Python/R data science environments
- ✅ VS Code - Extensions and user settings
- ✅ Configuration files - .bashrc, .gitconfig, etc.
- ✅ Smart scheduling - Backup only when needed (25+ days old)
- ✅ Secure - Minimal sudo permissions, encrypted SSH key handling
- ✅ Cross-distro - Works on Ubuntu, Debian, and derivatives
git clone https://github.com/esosetrov/linux-env-backup
cd linux-env-backup
# Make scripts executable
chmod +x scripts/*.sh
# Run initial backup
./scripts/backup_system.sh- Edit
BACKUP_DIRin all script files to point to your backup location - Set up sudo permissions (see Security section)
- Configure cron for automatic backups
./scripts/backup_system.sh./scripts/restore_system.shAdd to crontab:
0 12 * * * /path/to/linux-env-backup/scripts/check_backup.shAdd to /etc/sudoers via sudo visudo:
# Allow passwordless apt-mark for automated backups
username ALL=(ALL) NOPASSWD: /usr/bin/apt-mark showmanual
SSH keys are NOT backed up by default. To backup SSH keys manually, store encrypted in secure location and methods.
backup_location/
├── apt_packages.txt
├── snap_packages.txt
├── vscode_extensions.txt
├── vscode_user/
│ ├── settings.json
│ └── keybindings.json
├── conda_env_*.yml
├── .bashrc
├── .gitconfig
└── backup_summary.txt
- bash 4.0+
- conda/miniconda (optional)
- VS Code (optional)
- sudo permissions for package listing
This project is licensed under the MIT License - see the LICENSE file for details.
Pull requests welcome! Please ensure scripts work on Ubuntu and Debian derivatives.
This notebook is designed for educational and research purposes. Real-world applications may require additional considerations and validation.