home/.config/fish/scripts/backup
2025-05-28 16:39:25 +02:00

26 lines
No EOL
497 B
Fish
Executable file

#!/usr/bin/fish
set DIRECTORIES documents music pictures projects videos
set EXCLUDES node_modules .cache .godot .svelte-kit
set FLAGS --archive --compress --delete --quiet
set HOSTS $argv
set USER (whoami)
set DESTINATION "~/files/"
for exclude in $EXCLUDES
set -a FLAGS --exclude $exclude
end
for host in $HOSTS
set_color yellow
echo "$host"
for dir in $DIRECTORIES
set_color blue
echo "$dir"
set_color normal
rsync $FLAGS ~/$dir $host:$DESTINATION
end
echo ""
end