aboutsummaryrefslogtreecommitdiff
path: root/env/.local/bin/scripts/backup/backup-flash-priv
blob: dae5936d6dadc088e7b49a3b88c4706277787966 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
cd ~/stuff/scripts || exit

fsync () {
    # t?
    rsync -RUuavn --delete-after $exclude $syncfile "$target"
    printf "===commit these changes?\n"
    printf "y/n: "
    read -r uinput
    if [ "$uinput" != "n" ] && [ "$uinput" != "N" ]; then
        printf "\n\n\n"
        rsync -RUuav --progress --delete-after $exclude $syncfile "$target"
        printf "\n===end sync\n---------\n\n"
    fi
}

syncfile="LINUX-SERVER1 sites"
target="/mnts/flash/backups"
exclude=""

fsync