Quick overview of the problem. I have a website that is in SVN and checked out on 2 different servers for load balancing. It's a drupal site and everything besides the assets and files directory is checked out locally on the servers.
Now on an update i have to update the two local checkouts manually.(svn up) This is prone to errors and will provide even more overhead if we decide to add another webserver to the rotation.
So in short: I have to find a way to automate keeping the 2 local checkouts in sync so i only have to update on 1 server and everything gets synced.
Things i have tried:
md5 sum of the directory on server 1 and through SSH on server 2 (excluding the .svn directories) using a find command, then executing svn ups on server 2 using the outcome of diff as arguments. It always gives me the same files that are different.
ssh $TARGET "cd "$SVN_TARGET" && find . -name .svn -prune -o -type f -print0 | xargs -0 md5sum" >> /tmp/server2.sums
cd $SVN_SOURCE && find . -name .svn -prune -o -type f -print0 | xargs -0 md5sum >> /tmp/server1.sums
diff /tmp/server1.sums /tmp/server2.sums | cut -d"." -f2 | xargs -i ssh $TARGET "su www-data -c 'svn up /dir/to/svn/repo/{} --username \"*******\" --password \"******\"'"
using svn info and then svn diff with the head revision to give me all the files changed. The problem there is that the local revision id doesn't equal the one of the head revision on the SVN server even when it's up to date.
Any help is much appreciated and excuses for the wall of text :)