Content deployment tool


#1

Has anyone built a tool to move content from one environment to another? For example, most of our clients have a staging environment, and each developer might have their own development environment. Right now if we create content in our staging environment, once the client has tested this we have no easy way to move that content from the staging environment to the production environment. Basically we either recreate the content manually, or sometimes if there is a large amount we will write some one-off scripts to handle moving the content.

Has anyone built a tool to handle this more generically?

I’m thinking select a node in the site tree and move it, either creating new items in the destination or updating existing items, moving selected content items for a given content type, etc.

I can see some initial hurdles to get around, for example copying files and images. If you insert a link to an image or file into a rich text field, its hard to guarantee that file would get the same objectid, or the image might have a different file name if the destination had a conflict.

I’m just trying to avoid work if someone else has already built something like this already. I’m lazy :slight_smile:


#2

Not to my knowledge… We’ve talked about it a few times; should it be in core, should it be a separate tool, what kind of granularity would it need (whole content type, last X records, last Y days of records, the whole site tree, partial site tree), how do you handle non-database assets, etc.

What we usually return to is that it’s easy enough to take a DB backup from one place and restore it in another, and it’s a process unrelated to the framework (i.e. it’s “just” a DB).

I can see that when you 100% need to do partial data moves then some kind of tool would be necessary. I’d probably see it as a plugin rather than a core feature. The Skeleton Export in the webtop can generate SQL for data inserts but it simply works on an entire table I think. If there is anything in there that you wanted to use but it doesn’t quite work then you could do a little refactoring (always happy to receive PRs in GitHub!), or just copy some of the ideas, or none of them, whatever is easiest :slight_smile:


#3

Yeah I have some ideas as to how to handle it as a plugin but just wanted to see if anyone had ever attempted it.

Not sure if I’ll ever build it but it’s come up in a couple different conversations recently so it’s on my mind.


#4

Did you build a plugin for content deployment?