2023-08-06 22:15:06 +02:00
|
|
|
#!/usr/bin/env zsh
|
|
|
|
|
|
|
|
BAK="/Data/_bak"
|
|
|
|
|
|
|
|
|
|
|
|
# restic init '/home/dym/.privat' \
|
|
|
|
# -p '/home/dym/.privat/restic/p.txt' \
|
|
|
|
# -r "$BAK/.privat"
|
|
|
|
|
|
|
|
restic backup '/home/dym/.privat' \
|
2023-12-25 18:49:51 +01:00
|
|
|
-p '/home/dym/.privat/restic/p.txt' \
|
|
|
|
-r "$BAK/.privat_home"
|
2023-08-06 22:15:06 +02:00
|
|
|
|
|
|
|
|
2023-12-25 18:49:51 +01:00
|
|
|
cd `realpath "$0" | xargs dirname`
|
|
|
|
./bak-home.sh "$BAK/Home_deb"
|
2023-08-06 22:15:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
sudo \
|
|
|
|
rsync -zrhP --links --size-only --verbose --delete \
|
|
|
|
--exclude '**/.Trash-1000' \
|
|
|
|
--exclude '**/__sapper__/' \
|
|
|
|
--exclude '**/node_modules/' \
|
|
|
|
--exclude '**/target/' \
|
2023-12-25 18:49:51 +01:00
|
|
|
"/Servers/self/My/" \
|
2023-08-06 22:15:06 +02:00
|
|
|
"/Data/_my"
|
|
|
|
|
|
|
|
|
|
|
|
# sudo \
|
|
|
|
# rsync -zrhP --links --size-only --verbose --delete \
|
|
|
|
# --exclude '**/.Trash-1000' \
|
|
|
|
# --exclude '**/__sapper__/' \
|
|
|
|
# --exclude '**/node_modules/' \
|
|
|
|
# --exclude '**/target/' \
|
|
|
|
# "/Work/" \
|
|
|
|
# "$BAK/work-CURRENT"
|
|
|
|
|
|
|
|
|
|
|
|
DIRS=(
|
2023-12-25 18:49:51 +01:00
|
|
|
_
|
2023-08-06 22:15:06 +02:00
|
|
|
Books
|
|
|
|
Code
|
|
|
|
Img
|
|
|
|
Music
|
|
|
|
Ui
|
2023-12-25 18:49:51 +01:00
|
|
|
Forks
|
|
|
|
Fonts
|
|
|
|
Templates
|
|
|
|
Work
|
2023-08-06 22:15:06 +02:00
|
|
|
)
|
|
|
|
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/' \
|
2023-12-25 18:49:51 +01:00
|
|
|
"/Servers/self/$DIR/" \
|
2023-08-06 22:15:06 +02:00
|
|
|
"$BAK/${DIR}"
|
|
|
|
done
|
|
|
|
|
2023-10-11 21:29:03 +02:00
|
|
|
DIRS=(
|
|
|
|
Apps
|
2023-12-25 18:49:51 +01:00
|
|
|
Cfg
|
2023-10-11 21:29:03 +02:00
|
|
|
)
|
|
|
|
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/' \
|
|
|
|
"/$DIR/" \
|
|
|
|
"$BAK/${DIR}"
|
|
|
|
done
|
|
|
|
|
2023-08-06 22:15:06 +02:00
|
|
|
|
|
|
|
sudo \
|
|
|
|
rsync -zrhP --links --size-only --verbose --delete \
|
2023-12-25 18:49:51 +01:00
|
|
|
"/var/lib/docker/" \
|
|
|
|
"$BAK/var_lib_docker"
|