Last active
January 1, 2016 22:09
-
-
Save alex-vlasov/8208302 to your computer and use it in GitHub Desktop.
box.net WebDAV backup-manager backup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -n "`mount | grep box.net`" ] | |
then | |
echo "box.net mounted, continue" ; | |
else | |
echo "box.net not mounted, trying to mount" ; | |
modprobe fuse | |
mount -t davfs https://dav.box.com/dav /media/box.net | |
if [ -z "`mount | grep box.net`" ] | |
then | |
echo "impossible to mount, exiting" ; | |
exit ; | |
fi | |
fi | |
result=`backup-manager 2>&1` ; | |
echo $result ; | |
error_test_string="/usr/share/backup-manager/backup-methods.sh: line 49:" | |
while [[ $result =~ $error_test_string ]] | |
do | |
echo "Error during upload, retrying ..." ; | |
result=`backup-manager 2>&1` ; | |
echo $result ; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment