summaryrefslogtreecommitdiff
path: root/backup
blob: 5a0347f150eb9f84aece1c2c67989beff1702300 (plain)
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
#!/bin/zsh

sudo rsync -avv --exclude-from /home/pks/.local/bin/backup.exclude --delete / /media/dock/b/bogues.local

ping -q -w 1 -c 1 alphard.uberspace.de
if [ $? -eq 0 ]; then
  rsync -kavv pks@alphard.uberspace.de: /media/dock/b/alphard.uberspace.de
fi

ping -q -w 1 -c 1 mirfac.uberspace.de
if [ $? -eq 0 ]; then
  rsync -kavv smnr@mirfac.uberspace.de: /media/dock/b/mirfac.uberspace.de
fi

adb devices | grep a23dc087
if [ $? -eq 0 ]; then
  adb backup -apk -shared -all -f /media/dock/b/malone.ab
fi

ping -q -w 1 -c 1 mirfac.uberspace.de
if [ $? -eq 0 ]; then
  rsync -kavv smnr@mirfac.uberspace.de: /media/dock/b/mirfac.uberspace.de
fi

ping -q -w 1 -c 1 oneal
if [ $? -eq 0 ]; then
  rsync -e "ssh" --rsync-path="sudo rsync" --exclude-from /home/pks/.local/bin/backup.exclude --delete -avvHS osmc@oneal:/ /media/dock/b/oneal.local/
else
  ping -q -w 1 -c 1 w.simianer.de
  if [ $? -eq 0 ]; then
    rsync -e "ssh" --rsync-path="sudo rsync" --rsh='ssh -p 2001' --exclude-from /home/pks/.local/bin/backup.exclude --delete -avvHS pks@w.simianer.de:/ /media/dock/b/oneal.local/
  fi
fi