This repository contains scripts to backup your Fedora system and restore it on a new machine.
It includes:
- DNF packages
- Flatpak apps
- Enabled repositories
- Enabled services
/etcconfiguration- User dotfiles (
~/.config,~/.local,.bashrc,.zshrc, etc.)
Install required tools:
sudo dnf install -y dialog jq flatpak
- Copy
backup.shto your Fedora machine. - Make it executable:
chmod +x backup.sh - Run the backup script:
./backup.sh
- A menu will appear allowing you to select which components to backup.
- For each TXT or archive file, you can overwrite or merge with existing backups.
- Backup files are stored in
backups/.
Files created:
backups/
├── dnf-user.txt
├── flatpak.txt
├── repos.txt
├── services.txt
├── etc-config.tar.gz
└── dotfiles/
- Copy
restore.shand the folder./backupsto the new Fedora system. - Make the restore script executable:
chmod +x restore.sh - Run the script:
./restore.sh
- The wizard provides interactive menus for DNF packages, Flatpaks, services, dotfiles, and
/etc. - All packages are pre-selected by default, you can toggle which ones to install.
- The script will automatically enable repositories if required.
- DNF will handle dependencies automatically.
- Restoring
/etcoverwrites system configuration — use with caution. - Dotfiles overwrite your current files in your home directory.
- This setup can be extended to include
/optprograms or additional manual binaries. - Scripts are idempotent — you can run multiple times safely.
- Backup old machine:
./backup.sh - Copy
backups/to new machine along withrestore.sh. - Restore on new machine: ./restore.sh`
- Enjoy your replicated Fedora environment!