aboutsummaryrefslogtreecommitdiff
path: root/backup.sh
blob: 0f4043f7799378d4686384dec19369633144bf62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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"