#!/usr/bin/env bash # local directory orig="/home/philip/src/gopher" # destination dest="gaia:/srv/" # reset permissions find "$orig" -type d -exec chmod 755 {} \; find "$orig" -type f -exec chmod 644 {} \; # sync rsync -avzP --delete \ --exclude={'guestbook/db','guestbook/gophermap','feeds/gophermap','feeds/*/gophermap','cache'} \ -e "ssh" "$orig" "$dest" ssh gaia chmod -R 777 /srv/gopher/guestbook/db