考虑将 Joomla 从一台数据库服务器迁移到另一台数据库服务器吗?

发布于 2024-08-01 18:18:42 字数 195 浏览 2 评论 0原文

过去几个月我一直在构建一个基于 joomla 的网站,现在是时候将该网站从我的个人开发服务器迁移到生产服务器了。 我最初的想法是转储数据库并在生产服务器上重新创建它,但我想知道是否有更好的方法。 不幸的是,开发服务器上已经存在一些我需要保留的内容,否则我只需“重新安装”并应用我创建的模板。

有什么想法吗?

谢谢, 克里斯

I've been building a joomla-based website for the past couple of months and the time has come to migrate the site from my personal development server to the production one. My initial thought was to dump the database and recreate it on the production server, but I'm wondering if there is a better way. Unfortunately there is some content already present on the development server that I need to preserve, otherwise I would just "reinstall" and apply the template I created.

Any thoughts?

Thanks,
Chris

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

や莫失莫忘 2024-08-08 18:18:42

首先,我想指出,如果您在两个平台上都有 phpmyadmin,则无需干预 /lib/mysql 或 mysqldump。 只需将结构和数据导出为“sql”并在新位置将整个数据库作为查询运行,移动 mysql 数据库就非常简单且安全。

另外,还有很棒的 'JoomlaPack',它可能正是您想要使用的。
JoomlaPack 可以备份您的整个站点,包括其他数据库等,并使用修改后的 JoomlaInstaller 在任何其他服务器上重新安装整个包。

现在,在您的情况下,整个事情比这更复杂一点,因为每个服务器上都有内容,如果我猜对了,您需要合并内容。

可能的解决方案:

1)您需要合并多少内容? 如果生产服务器上的内容量较少,只需先手动迁移到测试环境,然后使用JoomlaPack进行完整备份,将备份上传到生产环境并使用JoomlaPack安装程序来全新安装 Joomla,包括您的数据和所有内容!

2) 如果多一点,您可以从两个版本的“sql”数据转储的'diff'(比较)开始,然后仔细合并该数据并按照 1) 中的方式继续。 如果您安装了 TortoiseSVN,则可以使用 WinDiff 或 TortoiseDiff。

First of all I would like to point out that you need not meddle with /lib/mysql, or mysqldump if you have a phpmyadmin on both platforms. Moving mysql databases around is really easy and secure just with exporting structure and data as 'sql' and running the whole thing as query in the new place.

Plus there is the great 'JoomlaPack' which is probably what you want to use anyways.
JoomlaPack can backup your entire site including additional databases, etc. and reinstall the whole package using a modified JoomlaInstaller on any other server.

Now in your case the whole thing is a bit more complicated than this because you have content on each server and if I get you right you need to merge the content.

Possible solutions:

1) How much content do you need to merge? If the amount of content on the production server is small, just hand-migrate it to your test environment first, then use JoomlaPack to make a full backup, upload the backup to your production environment and use the JoomlaPack installer to make a fresh install of Joomla including your data and everything!

2) If it is a bit more, you can start with a 'diff' (comparison) of the 'sql' data dumps of both versions then merge that data carefully and proceed as in 1). You can use WinDiff for this or TortoiseDiff if you have TortoiseSVN installed.

我一直都在从未离去 2024-08-08 18:18:42

不幸的是,您无法像 MSSQL 数据库一样复制 mdf 和 ldf 文件并重新附加。 以下是一篇关于如何将 MySql 数据库从一台服务器复制到另一台服务器的文章。

复制 MySql 数据库

Unfortunately you can't copy the mdf and ldf files like a MSSQL database and reattach. The following is an article on how to copy a MySql database from one server to another.

Copy MySql Database

笙痞 2024-08-08 18:18:42

是的,在你的 mysql 安装下(通常在 /lib/mysql 之类的地方)应该有每个数据库的文件夹。 您可以简单地复制它,例如下载为 zip 文件,上传到新位置并解压。 它肯定可以在同一服务器上复制数据库,不明白为什么它不能在不同的服务器上工作。

如果没有,您可以使用 PHPMyAdmin 之类的东西(实际上可能更简单)。 只需登录,选择数据库,然后单击右框顶部的导出即可。 勾选保存为文件。 然后您可以将其导入到新服务器上。

Yep, under your mysql installation (normally somewhere like /lib/mysql) there should be a folder for each database. You can simply copy this, eg download as a zip file, upload to new location and extract. It definitely works to copy databases on the same server, don't see why it wouldn't work on a different server.

If it doesn't though, you can use something like PHPMyAdmin (probably simpler, actually). Just log in, select the database then click Export on the top of the right frame. Tick to save as file. You can then import this on your new server.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文