]> git.somenet.org - somenet/homesync.git/blob - homeload.sh
dotfile handling + formatting
[somenet/homesync.git] / homeload.sh
1 #!/bin/bash
2
3 SLEEPTIME=5
4 echo "Will sync ${HOME} FROM server in ${SLEEPTIME} sec..."
5
6 if [[ "$1" == "ALL" ]] ; then
7   echo "ALL enabled! This will sync almost all data. Also cross-fs!"
8   sleep $SLEEPTIME
9   rsync -vapP --delete --sparse --exclude='/.**' --exclude='/Downloads' --exclude='/VirtualBox VMs/*.nosync' \
10         --exclude='/Nextcloud*' \
11         "home.somenet.org:HOMESYNC_DATA/" "${HOME}/"
12
13 elif [[ "$1" == "QUICK" ]] ; then
14   echo "QUICK sync: Will skip VMs."
15   sleep $SLEEPTIME
16   rsync -vapPx --delete --sparse --exclude='/.**' --exclude='/Downloads' --exclude='/VirtualBox VMs' \
17         --exclude='/Nextcloud*' \
18         "home.somenet.org:HOMESYNC_DATA/" "${HOME}/"
19 else
20   echo "Use ALL or QUICK! Doing nothing."
21   exit 1
22 fi