Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Transfer of Content from dev to live


Reply


8 Posts   2015 Views

Avatar
BigChris

Community Member, 63 Posts

16 March 2010 at 4:45am

Hello,

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.

Cheers
Chris

Avatar
SSadmin

Community Member, 90 Posts

16 March 2010 at 11:06am

Hey,BigChris,

met the same problem during development processes.

Using the whole sql export and import method a lot plus SVN.

But its actaully hard to sync and time consuming..

Still waiting for efficient way to sync data crossing dev & Live.

Alex

Avatar
Willr

Forum Moderator, 5513 Posts

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.

Avatar
Benedikt

Community Member, 16 Posts

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.

Avatar
BigChris

Community Member, 63 Posts

21 March 2010 at 12:36am

Thank you for the information, will help a lot.

Cheers
Chris

Avatar
Mo

Community Member, 514 Posts

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.

Hope that is of some help.

Mo

Avatar
justinv

Community Member, 8 Posts

20 June 2010 at 11:11pm

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.

Is this how others are managing their files?

Avatar
Willr

Forum Moderator, 5513 Posts

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.