2

I am setting up a simple online cms/editing system with a few multiple editors and would like a simple audit trail with diff, history, comparison and roll back functionality for small bits of text.

Our editors have gotten used to the benefits of using XML / Svn and I really would like to create a simple version of this in my system.

I realise I could probably create my own using say, a versions / history db with linked ids like this but I wondered if this is the best way or if there is an equivalent to an Svn api style interface available?

Btw I am totally new to Mongodb so go easy on me :-)

Cheers

Community
  • 1
  • 1
Thereman
  • 21
  • 2
  • Do you want to put your Mongo database under version controll or do you want to use Mongo as a version controll persitence application? – DrColossos Apr 22 '12 at 09:51
  • If I could somehow put mongodb under version control and have the same functionality as say XML files under version control that would be ideal as I would not have to try to reproduce an existing system. Somehow I suspect that this is not possible? I suppose the real issue I am trying to solve is backtracking and comparing changes made by multiple users over time. I am only talking a handful of users by the way. I am also planning on using a php driver. – Thereman Apr 22 '12 at 16:16

1 Answers1

0

Putting the data that create the database is not a good idea since it consits only of binary data. Additionally, this is rather huge in the beginnging since MongoDB allocates some disk space for it. So you have no benefit of putting the data folders under version controll.

If you want to track changes, you could export the data into its serialized form and store it in your VCS. If this is getting bigger, the advantage of the VCS may also drop since it will become very slow.

I assume you need to track the changes from within the data but since you deal with binary data, you are out of luck.

DrColossos
  • 12,656
  • 3
  • 46
  • 67
  • Thanks, could do but exporting a shed load of data each time there is a minor change seems a bit inefficient? I would also lose the diff by author option. I could add an author ID to every post but could not track this in the usual VCS way? – Thereman Apr 22 '12 at 16:52