aboutsummaryrefslogtreecommitdiff
path: root/backup.sh
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-09-25 12:15:28 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2025-09-25 12:22:59 +0200
commit1626df25e8075d13e7705c017a14f710a2fbeab3 (patch)
treeedbe796fe8ff3f1c91dc4a636247ce7b57ced6e3 /backup.sh
parent7708d5cbb40a78b3cf16bef41d45fbc33958cd39 (diff)
feat(sh): script to backup laptop in cloud
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"