DVCS,数据库和用户生成的内容? [英] DVCS, Databases, and User Generated Content?

查看:114
本文介绍了DVCS,数据库和用户生成的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个开发环境,我的中央存储库托管在bitbucket / github之类的位置。然后在我的开发服务器和我的生产服务器我将有克隆。



我将致力于新功能,并在开发人员服务器上进行本地提交。一旦这个阶段可以推向生产阶段,我将从开发克隆推送到中央存储库,然后从中央库还原到生产服务器。



<所有这一切都是有道理的,但有两部分我无法弄清楚。



如何保留数据库和用户生成的内容(文件上传等等)同步?



此外,当我在生产服务器上进行下一次拉+更新时,用户生成的内容会被消除吗? p>

其他人如何解决这个问题?



附加信息:
这将是一个MySQL / PHP网站。我也在计划使用mvc框架(大概是蛋糕),我还没有坚决决定使用哪个DVCS,但到目前为止,Mercurial正在考虑。不知道这个信息是否重要,但是添加以防万一。

解决方案

这就是为什么DVCS不总是适合发布管理:一旦您的代码在服务器远程备份上,您应该有另一个rsync机制:




  • 提取正确的标签(一个放在prod中)

  • 转换/复制正确的文件

  • 保留其他文件/数据库集。


I want to create a development environment with my central repository hosted somewhere like bitbucket/github. Then on my dev server and my production server I will have clones.

I will work on new features and make local commits on the dev server. Once this is at a stage that it can be pushed to production, I will push from the development clone to the central repository, then pull from the central repo to the production server.

All this makes sense, but there are 2 parts I cannot figure out.

How to keep the data-base and user-generated content (file uploads, etc.) in sync?

Also, will user generated content get wiped out when I do my next pull+update on the production server?

How do others address this?

Additional info: This is going to be a MySQL/PHP website. I am also planing on using a mvc framework (probably cake) and I haven't firmly decided which DVCS to use but so far Mercurial is what I am thinking. Not sure if this info matters but adding just in case.

解决方案

That is why a DVCS is not always the right tool for release management: once your code is on the server remote repo, you should have another "rsync" mechanism to:

  • extract the right tag (the one to put into prod)
  • transform/copy the right files
  • leave intact other set of files/database.

这篇关于DVCS,数据库和用户生成的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆