summaryrefslogtreecommitdiff
path: root/backup
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2016-05-10 16:09:30 +0200
committerPatrick Simianer <p@simianer.de>2016-05-10 16:09:30 +0200
commitac0f614b8fc4ae6bfd331dde158f349ae3c99660 (patch)
tree080c2da86e1babfdbe5fe4c5e79b4d8ba30b48da /backup
parente7555050b890fc09af864590f557e1b61fa9e451 (diff)
backup: better script
Diffstat (limited to 'backup')
-rwxr-xr-xbackup17
1 files changed, 15 insertions, 2 deletions
diff --git a/backup b/backup
index 1ec29ad..a9e2b79 100755
--- a/backup
+++ b/backup
@@ -1,6 +1,19 @@
#!/bin/zsh
sudo rsync -avv --exclude-from /home/pks/.local/bin/backup.exclude --delete / /media/dock/b/bogues.local
-rsync -kavv pks@alphard.uberspace.de: /media/dock/b/alphard.uberspace.de
-rsync -kavv smnr@mirfac.uberspace.de: /media/dock/b/mirfac.uberspace.de
+
+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/mallone.ab
+fi