Remote / local server - need advice



  • I'm working on a project that has the following setup:

    - developing on my local machine with IIS and SQLServer and a 3rd party CMS.

    - remote development server with same setup, users are actively entering content onto the CMS. 

    The remote server must be VPN'ed into, this makes it too slow to edit/develop files directly, especially because visual studio seems to not like the mapped drive over vpn. So every morning I make a backup of the remote database, and an image directory (those are the only two things the CMS changes) and move them locally, and restore the local db from the bak file.  Then I have a reasonalbly fresh copy of the content to work from. It a functional system, but it's a big pain. 

    Surely this is a WTF way to do it. Can someone suggest some automated way to do what Ive been doing manually, that is grab a directory and backup/restore (or sync) a database from a remote server to a local one, over vpn? 

     

     



  • For the database, a down and dirty way is to get RedGate's Data Compare for about $295 US.  If the CMS alters database structures you'll need their SQL Compare package to pull those over.  I believe it comes with a command line tool so you can script it.  RedGate's tools are amazingly fast at synchronizing databases and data.  Another option is DTS/SSIS depending on what version you have, but much more difficult to develop.  The last is some sort of replication, database mirroring or log shipping, but those are really meant for failover and not dev. syncing - too much setup overhead IMO.

    As far as the image directory, since it is a CMS can you just use wget to grab the changes via the URL itself rather than synching the directory?  You could also write a vbscript looking at modification timestamps to pull the files over.

     



  • @chebrock said:

    So every morning I make a backup of the remote database, and an image directory
     

    You might already know about them, but rsync and unison are good tools for synchronizing directories.  Rsync IMO is easier to just use, but unison is a bit faster once you get it set up to.  If you use rsync, and the files are mostly compressed images, the -W (--whole-file) option will make it a bit faster too. 



  • I'll go one further and say "put your database server on the VPN and use subversion or another VCS for the code and images".

     

    Oh, and this is my first post - hi everyone 


Log in to reply