我正在尝试在 MarkLogic 中设置带有日志归档的增量备份,但我很难在管理界面中找到“purge-journal-archiving”设置。为了进行此设置,“purge-journal-archiving”需要设置为“true”。我已检查数据库的配置页面,在设置备份时没有任何内容可以指定。我不知道我是否在某个地方遗漏了一些东西。我需要通过 Rest API 调用它吗?
相关文档没有提供关于在哪里进行更改的明确指示。
Incremental Backup with Journal Archiving
Incremental backup improves restore both time and space requirements over journal archiving, but it's not an either/or decision. You can, and should, use both where appropriate. If your goal is to be able to restore to any arbitrary point in time, while minimizing potential data loss, we suggest the following:
- Configure a scheduled full backup at some coarse granularity (for example, weekly) and enable journal archiving
- Configure a scheduled incremental backup as some finer granularity (for example, hourly), and specify
purge-journal-archiving=true
.- Set retain until backup on the database Merge Policy so that deleted fragments are retained until they have been included in an incremental backup. See Setting Merge Policy or
admin:database-set-retain-until-backup
for details.
最佳答案
我在用户界面中找不到清除日志存档设置。我认为一旦您选择了数据库,它就会出现在“计划备份”页面上,但在那里找不到它。
还有一些其他方法可以更改此设置。
- 通过 xquery admin API 创建增量备份时,您可以设置 purge-journal-archive 标志。有关更多详细信息,请参阅( https://docs.marklogic.com/admin:database-daily-incremental-backup )。
您还可以将其作为对管理 API 的 HTTP 请求的一部分来执行。更多详细信息请参见 ( https://docs.marklogic.com/REST/POST/manage/v2/databases )。如果您有ml-gradle项目,强烈推荐这个,您应该能够将其添加到您的数据库设置文件中。
您还可以在备份后手动清除日志,或使用服务器 JavaScript 代码(或 XQuery )将其作为脚本的一部分。 (https://docs.marklogic.com/xdmp.databaseJournalArchivePurge)。您可以将这部分作为主模块或其余扩展并调用它。如果您确实有困难,可以调用 eval带有服务器端代码的端点。
关于marklogic - "purge-journal-archiving"设置在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51827799/