_dump/bak-current.sh

40 lines
668 B
Bash
Raw Normal View History

#!/usr/bin/env zsh
2023-12-25 18:49:51 +01:00
BAK="/home/dym/Servers/self-files"
if [ ! -z "$1" ]; then
BAK="$1"
fi
cd `realpath "$0" | xargs dirname`
./bak-home.sh "$BAK/Home_bak"
cp /home/dym/.config/doublecmd/doublecmd.xml \
/Cfg/doublecmd/
DIRS=(
Apps
Cfg
)
for DIR in "${DIRS[@]}"; do
echo "-
-
2023-12-25 18:49:51 +01:00
# '/$DIR'"
sudo \
rsync -zrhP --links --size-only --verbose --delete \
--exclude '**/.Trash-1000' \
--exclude '**/__sapper__/' \
--exclude '**/node_modules/' \
--exclude '**/target/' \
"/$DIR/" \
2023-12-25 18:49:51 +01:00
"$BAK/${DIR}_bak"
done
echo "-
-
2023-12-25 18:49:51 +01:00
# '~/.privat'"
sudo \
rsync -zrhP --links --size-only --verbose --delete \
"/home/dym/.privat/" \
2023-12-25 18:49:51 +01:00
"$BAK/.privat_bak"