]> git.somenet.org - somenet/homesync.git/blob - homestore.sh
allow not syncing of VMs
[somenet/homesync.git] / homestore.sh
1 #!/bin/bash
2
3 SLEEPTIME=5
4 echo "Will sync ${HOME} TO server in ${SLEEPTIME} sec..."
5
6 if [[ "$1" == "CROSSFS" ]] ; then
7   echo "CROSSFS sync enabled! This could be DANGEROUS!"
8 else
9   echo "CROSSFS sync disabled."
10 fi
11
12 sleep $SLEEPTIME
13
14 if [[ "$1" == "CROSSFS" ]] ; then
15   rsync -aHAvpP --delete --sparse --exclude='/.**' --exclude='/Downloads' --exclude='/VirtualBox VMs/*.nosync' \
16         --exclude='/sync.opera/cache/**' --exclude='/sync.opera/application_cache/**' --exclude='/sync.opera/icons/**' \
17         "${HOME}/" "homesync.somenet.org:HOMESYNC_DATA/"
18 else
19   rsync -axHAvpP --delete --sparse --exclude='/.**' --exclude='/Downloads' --exclude='/VirtualBox VMs/*.nosync' \
20         --exclude='/sync.opera/cache/**' --exclude='/sync.opera/application_cache/**' --exclude='/sync.opera/icons/**' \
21         "${HOME}/" "homesync.somenet.org:HOMESYNC_DATA/"
22 fi