16 March 2010 at 4:45am
How would you go about transferring data/content from a dev server to a live server?
The only way I know to do it is a full database sql export and then import on the other server. Reason I ask is i often have to develop on a local machine then when finished coding/designing move to the live machine.
Sometimes though there are changes/bugs needed to be sorted out and sometimes the data between both servers gets out of synch.
16 March 2010 at 11:59am
BigChris - the only guide we have is http://doc.silverstripe.org/doku.php?id=publishing-to-web-server which works well for smaller sites. More robust publication systems (like what we use internally) have svn / git integration and automatic rsync's to sync the environments.
16 March 2010 at 10:33pm
I wouldn't sync the live database with the dev database (you might encounter the PHP hash bug then: http://open.silverstripe.org/ticket/3004 ). Imho, it's sufficient to develop on the dev server with test data. If everything works fine on the dev system, you can make a dump of the live db, upload the files and rebuild the database.
22 March 2010 at 11:57am
At work we use Beanstalk (http://beanstalkapp.com/) as a hosted SVN repo. This has the benefit of having 'deployment' settings, that will sync your source code with up to 3 different servers (via ftp or sshftp). It also syncs anything linked via svn:externals too (as long as the externals is in the same Beanstalk account, or a publicly readable repo).
In terms of the database, I generally try to steer clear of syncing dev with live. The development cycle tends to leave the database either a little bloated, or sometimes, just not very optimized (as you change settings and try to tweak stuff). I tend to prefer starting with a fresh database build when I push a site over to a live server. And using test data on my local development environment.
I had a read of the doc on moving from test to live, but just to confirm...
If I want to setup an svn repo with code that will be modified locally on my dev server and live on production server, then the only two directories I would need to import into that repo would be mysite/code and themes/, assuming I don't mind the database being different on my dev server.
20 June 2010 at 11:22pm
@justinv - correct if you're using svn externals for the sapphire/ cms/ and your other modules. You wouldn't want to copy these folders to your repo (unless you are making changes). Using externals for ss related code will also make your life easier in terms of updating the library.