DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Linux Mint System Backup and Restore


Use this note to build a development environment quickly on a fresh Ubuntu/Mint os.

Packages

First make sure <deb-url>/dists/<dist-name> of your distro exists. To Ubuntu Trusty, it's http://mirrors.ustc.edu.cn/ubuntu/dists/trusty/main or universe, restricted, etc. Then add the following lines to /etc/apt/sources.list:

deb http://mirrors.ustc.edu.cn/ubuntu/ trusty main universe restricted multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ trusty main universe restricted multiverse

Next run aptitude update and install the following packages with aptitude:

zsh git vim autojump curl tree tmux

The following packages are only needed on physical metal, not on virtual host:

i3 i3status dmenu openssh-server parcellite udevil

where udevil is for USB management.

Apps installed manually

  • dsnote

  • oh-my-zsh

  • pathogen

  • sysClone

  • Power management script: pm, see note Build Working Environment With I3 and Mint

vim plugins

  • plasticboy/vim-markdown

  • ctrlp

System configurations to be synchronized

Prototype of sysClone:

backupConf() {
    rsync -av --update --ignore-missing-args $HOME/{.zshrc,.zshenv,.bash_aliases,.vimrc,.gitconfig,.tmux.conf,.oh-my-zsh/themes/lichao.zsh-theme,.xsessionrc} confs/
    rsync -av --update --ignore-missing-args $HOME/.i3/config confs/.i3.config
}

restoreConf() {
    rsync -av --update confs/{.zshrc,.zshenv,.bash_aliases,.vimrc,.gitconfig,.tmux.conf,.xsessionrc} $HOME
    rsync -av --update confs/lichao.zsh-theme $HOME/.oh-my-zsh/themes
    rsync -av --update confs/.i3.config $HOME/.i3/config
}

I use an array of tuples to combine above 2 scripts. For details of its methods in shell, see Bash For Loop Array: Iterate Through Array Values and http://stackoverflow.com/questions/9713104/loop-over-tuples-in-bash

Firefox plugins

  • Downthemall

  • vimfx



Published

Apr 17, 2015

Last Updated

Apr 17, 2015

Category

Tech

Tags

  • backup 8
  • mint 24
  • restore 3

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor