Skip to content

Instantly share code, notes, and snippets.

@vmesel
Last active July 5, 2017 13:46
Show Gist options
  • Save vmesel/a93fd02c5135905d345538b77a3d208d to your computer and use it in GitHub Desktop.
Save vmesel/a93fd02c5135905d345538b77a3d208d to your computer and use it in GitHub Desktop.
# create bkp folders
mkdir ~/bkp/
mkdir ~/bkp/apt/
mkdir ~/bkp/python/
mkdir ~/bkp/.ssh/
mkdir ~/bkp/repos/
mkdir ~/bkp/downs/
mkdir ~/bkp/pics/
mkdir ~/bkp/desk/
mkdir ~/bkp/rcfiles/
# backup applications
sudo apt-get autoremove
dpkg --get-selections > ~/bkp/apt/Package.list
sudo cp -R /etc/apt/sources.list* ~/bkp/apt/
sudo apt-key exportall > ~/bkp/apt/Repo.keys
python -m pip freeze > ~/bkp/python/piplist.txt
python3 -m pip freeze > ~/bkp/python/piplist3.txt
#backup important files
cp ~/.ssh/* ~/bkp/.ssh/
cp ~/Github/* ~/bkp/repos/
cp ~/Downloads/* ~/bkp/downs/
cp ~/Pictures/* ~/bkp/pics/
cp ~/Desktop/* ~/bkp/desk/
cp ~/*.rc ~/bkp/rcfiles/
# # add app repositories
# sudo apt-key add ~/Repo.keys
# sudo cp -R ~/bkp/apt/sources.list* /etc/apt/
# sudo dpkg --set-selections < ~/bkp/apt/Package.list
# sudo add-apt-repository ppa:atareao/telegram
# sudo apt-add-repository ppa:sylvain-pineau/kazam
# sudo add-apt-repository ppa:otto-kesselgulasch/gimp
# echo 'deb http://repository.spotify.com stable non-free' | sudo tee --append /etc/apt/sources.list
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 94558F59
# echo "deb http://archive.canonical.com/ubuntu trusty partner" | sudo tee -a /etc/apt/sources.list.d/canonical_partner.list
# sudo apt-get update
#
# # add
# sudo apt-get update
# wget https://atom.io/download/deb -o atom-amd64.deb
# wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -o chrome.deb
# wget http://dbeaver.jkiss.org/files/dbeaver-ce_latest_amd64.deb -o dbeaver.deb
# wget https://downloads.slack-edge.com/linux_releases/slack-desktop-2.6.3-amd64.deb -o slack.deb
# sudo apt-get install kazam spotify-client gimp skype htop telegram npm
# sudo dpkg -i atom-amd64.deb
# sudo dpkg -i chrome.deb
# sudo dpkg -i dbeaver.deb
# sudo dpkg -i slack.deb
# sudo apt-get install python-pip python3-pip python-dev python3-dev
# python -m pip install ~/bkp/python/piplist.txt
# python3 -m pip install ~/bkp/python/piplist3.txt
# sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
# sudo mv ~/bkp/rcfiles/* ~/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment