-
Notifications
You must be signed in to change notification settings - Fork 0
/
backup.sh
35 lines (30 loc) · 1.12 KB
/
backup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# backup old machine's key items
# run this on old machine and send `~/backup` to the cloud
mkdir -p ~/backup/home
mkdir -p ~/backup/home/Library/"Application Support"
mkdir -p ~/backup/Library/Preferences/SystemConfiguration/
# what is worth reinstalling?
brew leaves > ~/backup/brew-list.txt # all top-level brew installs
brew cask list > ~/backup/cask-list.txt
npm list -g --depth=0 > ~/backup/npm-g-list.txt
yarn global list --depth=0 > ~/backup/yarn-g-list.txt
# backup some dotfiles (or dotfolders) likely not under source control
cp -Rp \
~/.aws \
~/.bash_history \
~/.config \
~/.extra \
~/.gnupg \
~/.nano \
~/.nanorc \
~/.ssh \
~/.vscode \
~/.z \
~/.zcompdump \
~/.zcompdump* \
~/.zsh_history \
~/backup/home
cp -Rp /Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist ~/backup/Library/Preferences/SystemConfiguration/ # wifi
cp -Rp ~/Library/Fonts ~/backup/home/Library/ # all those fonts you've installed
# editor settings & plugins
cp -Rp ~/Library/Application\ Support/Code ~/backup/home/Library/Application\ Support