-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackup.sh
More file actions
64 lines (42 loc) · 1.64 KB
/
backup.sh
File metadata and controls
64 lines (42 loc) · 1.64 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
##############################################################################################################
### backup old machine's key items
mkdir -p ~/migration/home/
mkdir -p ~/migration/Library/"Application Support"/
mkdir -p ~/migration/Library/Preferences/
mkdir -p ~/migration/Library/"Group Containers"
mkdir -p ~/migration/rootLibrary/Preferences/SystemConfiguration/
cd ~/migration
# what is worth reinstalling?
npm list -g --depth=0 > npm-g-list.txt
# backup some dotfiles likely not under source control
cp -Rp \
~/.gitconfig.local \
~/.ssh \
~/.z \
~/migration/home
# Documents
cp -Rp ~/Documents ~/migration
# Brave Browser
cp -Rp ~/Library/Application\ Support/BraveSoftware ~/migration/Library/"Application Support"
# Notes
cp -Rp ~/Library/Group\ Containers/group.com.apple.notes ~/migration/Library/"Group Containers"
# WiFi
cp -Rp /Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist ~/migration/rootLibrary/Preferences/SystemConfiguration/
# Fonts
cp -Rp ~/Library/Fonts ~/migration/Library/
# also consider...
# random git branches you never pushed anywhere?
# git untracked files (or local gitignored stuff). stuff you never added, but probably want..
# OneTab history pages, because chrome tabs are valuable.
# usage logs you've been keeping.
# iTerm settings.
# Prefs, General, Use settings from Folder
# maybe ~/Pictures and such
cp -Rp ~/Pictures ~/migration
# Brew (creates Brewfile)
brew bundle dump
# VSCode
# extensions
code --list-extensions | xargs -L 1 echo code --install-extension > vscode/ext
# settings
cp ~/Library/Application\ Support/Code/User/settings.json vscode