Skip to content

Instantly share code, notes, and snippets.

@andrepg
Last active August 2, 2020 21:25
Show Gist options
  • Save andrepg/10beffc6294864d9db9427260c932e0b to your computer and use it in GitHub Desktop.
Save andrepg/10beffc6294864d9db9427260c932e0b to your computer and use it in GitHub Desktop.
Sync file between Linux servers
echo "- Iniciando sincronizacao com servidor remoto"
echo "-- Abrindo conexao rSync"
rsync -varzuP --human-readable -e 'ssh -p 22' /local/path/* user@host.address.com:/remote/path/
rsync -varzuP --human-readable --exclude 'vendor' --exclude '.env' --exclude 'images' -e 'ssh -p 22' /local/path/* user@host.address.com:/remote/path/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment