Skip to content

Automated backup and restore solution for Linux development environments. Backs up packages, development environments, IDE settings, and configurations.

License

Notifications You must be signed in to change notification settings

esosetrov/linux-env-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Linux Development Environment Backup & Restore

Automated backup and restore solution for Linux development environments. Backs up packages, development environments, IDE (VS Code) settings, and configurations.

Features

  • 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

Quick Start

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

Configuration

  1. Edit BACKUP_DIR in all script files to point to your backup location
  2. Set up sudo permissions (see Security section)
  3. Configure cron for automatic backups

Usage

Manual Backup

./scripts/backup_system.sh

Restore on New Machine

./scripts/restore_system.sh

Automatic Backups

Add to crontab:

0 12 * * * /path/to/linux-env-backup/scripts/check_backup.sh

Security

Sudo Configuration

Add to /etc/sudoers via sudo visudo:

# Allow passwordless apt-mark for automated backups
username ALL=(ALL) NOPASSWD: /usr/bin/apt-mark showmanual

SSH Keys

SSH keys are NOT backed up by default. To backup SSH keys manually, store encrypted in secure location and methods.

File Structure

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

Requirements

  • bash 4.0+
  • conda/miniconda (optional)
  • VS Code (optional)
  • sudo permissions for package listing

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Pull requests welcome! Please ensure scripts work on Ubuntu and Debian derivatives.

Note

This notebook is designed for educational and research purposes. Real-world applications may require additional considerations and validation.

About

Automated backup and restore solution for Linux development environments. Backs up packages, development environments, IDE settings, and configurations.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages