数据管理系统
¥Data Management System
有时,你需要将数据移出或移入 Strapi 实例。这可以通过使用基于 CLI 的命令的数据管理系统来实现:
¥Occasionally, you need to move data out of or into a Strapi instance. This is possible with the data management system which uses CLI-based commands:
使用
strapi export
创建数据备份,用于存档目的或将其导入到另一个实例中。¥Use
strapi export
to create a data backup, for archive purposes or to import it in another instance.使用
strapi import
从备份恢复数据。¥Use
strapi import
to restore data from a backup.使用
strapi transfer
在本地和/或远程实例之间传输数据。¥Use
strapi transfer
to transfer data between local and/or remote instances.
以下文档提供了导出、导入和传输命令的说明和示例,而 CLI 参考文档 以精简格式列出了所有可用标志。
¥The following documentation gives explanations and examples for the export, import, and transfer commands, while the CLI reference documentation lists all available flags in a condensed format.
交互式 CLI 命令当前不适用于 npm
包管理器。对于 strapi export
和 strapi import
,这意味着加密密钥提示在 CLI 中不可见。同时考虑使用 yarn
包管理器。
¥Interactive CLI commands do not currently work with the npm
package manager. For strapi export
and strapi import
this means the encryption key prompt is not visible in the CLI. In the meantime consider using the yarn
package manager.