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' \
|
|
|
|
-p '/home/dym/.privat/restic/p.txt' \
|
|
|
|
-r "$BAK/.privat"
|
|
|
|
|
|
|
|
|
2023-10-11 21:29:03 +02:00
|
|
|
# cd `realpath "$0" | xargs dirname`
|
|
|
|
# ./bak-home "$BAK/Home_nix"
|
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/' \
|
|
|
|
"/Servers/self-files/My/" \
|
|
|
|
"/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=(
|
|
|
|
Books
|
2023-10-11 21:29:03 +02:00
|
|
|
Cfg_nix
|
2023-08-06 22:15:06 +02:00
|
|
|
Code
|
|
|
|
Img
|
|
|
|
Music
|
|
|
|
Ui
|
|
|
|
)
|
|
|
|
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-files/$DIR/" \
|
|
|
|
"$BAK/${DIR}"
|
|
|
|
done
|
|
|
|
|
2023-10-11 21:29:03 +02:00
|
|
|
DIRS=(
|
|
|
|
Apps
|
|
|
|
)
|
|
|
|
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
|
|
|
|
|
|
|
echo "-
|
|
|
|
-
|
|
|
|
# '.fonts'"
|
|
|
|
sudo \
|
|
|
|
rsync -zrhP --links --size-only --verbose --delete \
|
|
|
|
--exclude '**/.Trash-1000' \
|
|
|
|
--exclude '**/__sapper__/' \
|
|
|
|
--exclude '**/node_modules/' \
|
|
|
|
--exclude '**/target/' \
|
|
|
|
"/home/dym/.fonts/" \
|
|
|
|
"$BAK/Fonts"
|