Of course your script doesn't have to have as much stuff in it but you will need to stop any databases that are running or they will get corrupt

# Make script executable

chmod 755 sync_servers.sh

# test it

./sync_servers.sh

If it all works all you need to do is create a cron job to run it. You can create different unison profiles to backup daily, weekly, or just specific user data if you want. There is also a binary for windows. Don't use the windows gui though. Create a unison profile instead. When you install it on windows just look for a file called default.prf. Also note that the windows user can only backup data for the same name user on the linux box.