如何将单节点的 ML 内容数据库恢复到 3 节点集群中

huangapple go评论56阅读模式
英文:

How to restore a ML content db from single node to a 3-node-cluster

问题

我有一个单节点的ML开发环境。我已经备份了数据库。
我的目标是将该数据库备份恢复到一个3节点的ML集群中进行QA测试。

为了使数据库设置相同,我已经停用了内容-2和内容-3的数据库。因此,在3节点的ML集群中,只有一个与单节点开发环境相同的内容数据库。

然而,我看到了一些奇怪的消息,如下所示。

如何将单节点的 ML 内容数据库恢复到 3 节点集群中

此外,我不希望在数据库旁边看到is-data-dir消息。

这是点击恢复后的错误消息。

如何将单节点的 ML 内容数据库恢复到 3 节点集群中

FYI:

  1. 我曾经尝试成功将同样的数据库备份恢复到另一个单节点ML上。
  2. 在过去,我曾成功地以相反的方式执行相同的操作。我将一个3节点集群中的数据库还原到单节点上。我上次做的诀窍是在单节点上创建了三个内容数据库。
  3. 开发和QA都基于相同的ML版本。
英文:

I have a single-node ML dev environment. I already took a db backup.
My objective is to restore that db backup to a 3-node ML Cluster for qa.

In order to make the db set up the same, I have already retired the content -2 and content-3 db. Hence in 3-node ML cluster there is only one content forest same as the single-node dev environment.

However, I could see some strange messages like below.

如何将单节点的 ML 内容数据库恢复到 3 节点集群中

Moreoever I do not expect to see is-data-dir message next to the db.

Here is the error message after clicking restore.

如何将单节点的 ML 内容数据库恢复到 3 节点集群中

FYI:

  1. I did try to restore the very same db backup on another single node ML successfully.
  2. In the past I did successfully do the same things before but it is the reverse way. I restore a DB back from a 3 node cluster to a single node. The trick I did last time is to create three content forests on that single node.
  3. Both dev and qa are based on the same ML version.

答案1

得分: 2

似乎您正在指向一个不是备份目录的目录。MarkLogic备份目录通常以备份时间开始,看起来像这样:20230529-1837423059969

也许您正在指向备份所在目录的上级目录?

is-data-dir 表示该目录是MarkLogic数据目录。

通常最好将备份放在与森林数据分开的地方。当您看到这个信息时,我会怀疑这是否是一个备份位置,如果是的话,是否已将备份文件夹复制到 /var/opt/MarkLogic/ml-backups。您应该将备份放在不同的位置。

如果您尝试在MarkLogic数据目录内创建备份,将会出现错误:XDMP-BACKDATADIR。错误页面解释了在那里存储备份是一个不好的主意:

> 配置的备份目录与MarkLogic的数据目录相同,或者是MarkLogic的数据目录的子目录。

> 您的备份目录可能不在MarkLogic Server的安装目录或数据区域内。例如,在Unix上,您不应该将备份保存在 /var/opt/MarkLogic/opt/MarkLogic 下。

英文:

It appears that you are pointing to a directory that is not a backup directory. MarkLogic backup directories will start with a dateTime of when the backup was taken and will look something like: 20230529-1837423059969.

Maybe you are pointing to the parent directory of where a backup was taken?

is-data-dir is indicating that the directory is a MarkLogic data directory.

It's generally a good idea to put your backups in an area that is separate from the forest data. When you see that, it makes me question if this is a backup location, or if it is - whether you had copied the backup folders to /var/opt/MarkLogic/ml-backups. You should put your backups in a different location.

If you attempt to create a backup inside of the MarkLogic data directory, you will get an error: XDMP-BACKDATADIR. The error page explains that it's a bad idea to put your backups there:

> The configured backup directory is the same as, or is a sub-directory of, MarkLogic's data directory.

> Your backup directory may not be inside the MarkLogic Server installation or data area. For example, on Unix, you should not save your backups under /var/opt/MarkLogic or /opt/MarkLogic.

huangapple
  • 本文由 发表于 2023年5月29日 05:13:14
  • 转载请务必保留本文链接:https://go.coder-hub.com/76353622.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定