Last active
December 18, 2015 15:09
-
-
Save ssendeavour/5802839 to your computer and use it in GitHub Desktop.
Linux下备份及重装系统后还原系统设置和软件, 来自 http://askubuntu.com/questions/9135/best-way-to-backup-all-settings-list-of-installed-packages-tweaks-etc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## from http://askubuntu.com/questions/9135/best-way-to-backup-all-settings-list-of-installed-packages-tweaks-etc | |
dpkg --get-selections > ~/Package.list | |
sudo cp /etc/apt/sources.list ~/sources.list | |
sudo apt-key exportall > ~/Repo.keys | |
rsync --progress /home/`whoami` /path/to/user/profile/backup/here | |
## Reinstall now | |
rsync --progress /path/to/user/profile/backup/here /home/`whoami` | |
sudo apt-key add ~/Repo.keys | |
sudo cp ~/sources.list /etc/apt/sources.list | |
sudo apt-get update | |
sudo apt-get install dselect | |
sudo dpkg --set-selections < ~/Package.list | |
sudo dselect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment