Skip to content

Instantly share code, notes, and snippets.

@avances123
Created November 18, 2010 20:46
Show Gist options
  • Save avances123/705583 to your computer and use it in GitHub Desktop.
Save avances123/705583 to your computer and use it in GitHub Desktop.
sync con unison
#!/bin/bash
# set paths / dirs
_paths="/home/fabio/musica"
# binary file name
_unison=/usr/bin/unison
# server names
# sync server1.cyberciti.com with rest of the server in cluster
_rserver="fa-work"
# sync it
for r in ${_rserver};do
for p in ${_paths};do
${_unison} -batch "${p}" "ssh://${r}/${p}"
done
done
~
~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment