_dump/bak-current_to_archive.sh

88 lines
1.5 KiB
Bash
Raw Normal View History

#!/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-12-25 18:49:51 +01:00
cd `realpath "$0" | xargs dirname`
./bak-home.sh "$BAK/Home_deb"
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/" \
"/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
_
Books
Code
Img
Music
Ui
2023-12-25 18:49:51 +01:00
Forks
Fonts
Templates
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/' \
2023-12-25 18:49:51 +01:00
"/Servers/self/$DIR/" \
"$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
sudo \
rsync -zrhP --links --size-only --verbose --delete \
2023-12-25 18:49:51 +01:00
"/var/lib/docker/" \
"$BAK/var_lib_docker"