aboutsummaryrefslogtreecommitdiff
path: root/backup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'backup.sh')
-rwxr-xr-xbackup.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/backup.sh b/backup.sh
new file mode 100755
index 0000000..0f4043f
--- /dev/null
+++ b/backup.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/bash
+
+toBackup="/home/anhgelus/Documents/"
+backup="/home/anhgelus/cloud.anhgelus.world/Documents/Laptop/"
+
+if [ -d "$backup" ]; then
+ echo "cloud.anhgelus.world already mounted"
+else
+ mount -t davfs "https://cdn.anhgelus.world/private"
+fi
+
+rsync -az --exclude={'**/.git', '**/*.o'} "$toBackup" "$backup"
+
+echo "$toBackup was backuped in $backup"