82 lines
1.4 KiB
Bash
82 lines
1.4 KiB
Bash
|
#!/usr/bin/env zsh
|
||
|
|
||
|
BAK="/Data/_bak"
|
||
|
|
||
|
|
||
|
# restic init '/Servers/self/.privat' \
|
||
|
# -p '/Servers/self/.privat/restic/p.txt' \
|
||
|
# -r "$BAK/.privat_bak"
|
||
|
|
||
|
restic backup '/Servers/self/.privat' \
|
||
|
-p '/Servers/self/.privat/restic/p.txt' \
|
||
|
-r "$BAK/.privat_bak"
|
||
|
|
||
|
|
||
|
cd `realpath "$0" | xargs dirname`
|
||
|
./home.sh "$BAK/Home_m20"
|
||
|
|
||
|
|
||
|
sudo \
|
||
|
rsync -zrhP --links --size-only --verbose --delete \
|
||
|
--exclude '**/.Trash-1000' \
|
||
|
--exclude '**/__sapper__/' \
|
||
|
--exclude '**/node_modules/' \
|
||
|
--exclude '**/target/' \
|
||
|
"/Servers/self/My/" \
|
||
|
"/Data/_my"
|
||
|
|
||
|
|
||
|
sudo \
|
||
|
rsync -zrhP --links --size-only --verbose --delete \
|
||
|
--exclude '**/.Trash-1000' \
|
||
|
--exclude '**/__sapper__/' \
|
||
|
--exclude '**/node_modules/' \
|
||
|
--exclude '**/target/' \
|
||
|
"/Work/" \
|
||
|
"/Data/_work/self"
|
||
|
|
||
|
|
||
|
DIRS=(
|
||
|
Books
|
||
|
Code
|
||
|
Img
|
||
|
Music
|
||
|
Ui
|
||
|
Forks
|
||
|
Fonts
|
||
|
# Work
|
||
|
)
|
||
|
for DIR in "${DIRS[@]}"; do
|
||
|
echo "-
|
||
|
-
|
||
|
# '$DIR'"
|
||
|
sudo \
|
||
|
rsync -zrhP --links --size-only --verbose --delete \
|
||
|
--exclude '**/.Trash-1000' \
|
||
|
--exclude '**/__sapper__/' \
|
||
|
--exclude '**/node_modules/' \
|
||
|
--exclude '**/target/' \
|
||
|
"/Servers/self/$DIR/" \
|
||
|
"$BAK/${DIR}"
|
||
|
done
|
||
|
|
||
|
DIRS=(
|
||
|
Cfg
|
||
|
)
|
||
|
for DIR in "${DIRS[@]}"; do
|
||
|
echo "-
|
||
|
-
|
||
|
# '$DIR'"
|
||
|
sudo \
|
||
|
rsync -zrhP --links --size-only --verbose --delete \
|
||
|
--exclude '**/.Trash-1000' \
|
||
|
"/$DIR/" \
|
||
|
"$BAK/${DIR}"
|
||
|
done
|
||
|
|
||
|
|
||
|
# sudo \
|
||
|
# rsync -zrhP --links --size-only --verbose --delete \
|
||
|
# "/var/lib/docker/" \
|
||
|
# "$BAK/var_lib_docker"
|