-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbackup.sh
executable file
·17 lines (14 loc) · 995 Bytes
/
backup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
OPTIONS="--verbose --recursive --relative"
rsync $OPTIONS "$HOME"/.zshrc .
# rsync $OPTIONS "$HOME"/.drirc .
rsync $OPTIONS "$HOME"/.local/share/godot/app_userdata/Lorien/{palettes.cfg,settings.cfg,state.cfg} .
rsync $OPTIONS "$HOME"/.config/{alacritty,autostart,awesome,btop/btop.conf,dircolors,easyeffects,picom,starship.toml,tmux/tmux.conf} .
rsync $OPTIONS /etc/{makepkg.conf,mkinitcpio.conf,nsswitch.conf,pacman.conf,skel/.zshrc,systemd/network/20-ethernet.network,systemd/resolved.conf.d/20-multicastdns.conf,xdg/reflector/reflector.conf,xdg/user-dirs.conf,xdg/user-dirs.defaults,X11/xorg.conf.d/20-amdgpu.conf} .
# Requires sudo
echo "sudo access requried to backup the remaining files"
sudo rsync $OPTIONS /etc/{default/useradd,sudoers.d/20-users} .
sudo chown --recursive freddiehaddad:freddiehaddad ./etc
sudo rsync $OPTIONS /root/{.zshrc,.config/tmux} .
sudo chown --recursive freddiehaddad:freddiehaddad ./root
sudo rsync $OPTIONS /boot/loader/{entries,loader.conf} .