You can export saved connections in MongoDB Compass. Colleagues can import your saved connections, or you can use them in your other workspaces.您可以在MongoDB Compass中导出已保存的连接。同事可以导入您保存的连接,您也可以在其他工作区中使用它们。
About This Task关于此任务
When you export saved connections, Compass exports the list of connections as a JSON file.导出已保存的连接时,Compass会将连接列表导出为JSON文件。
By default, when you export saved connections, passwords are included in plaintext. To protect sensitive connection information, encrypt the exported file with a passphrase.默认情况下,导出已保存的连接时,密码将以明文形式包含。为了保护敏感的连接信息,请使用密码对导出的文件进行加密。
Procedure过程
To export encrypted saved connections with Compass:要使用Compass导出加密的已保存连接,请执行以下操作:
On the Connect screen, hover over Saved Connections in the left-side navigation and click the Ellipses (...) button.在连接屏幕上,将鼠标悬停在左侧导航中的“已保存连接”上,然后单击“省略号(…)”按钮。
In the Export saved connections dialog box, select the connection names you want to export.在“导出已保存的连接”对话框中,选择要导出的连接名称。
Under Target File, click Select a file... to specify the output file destination.在“目标文件”下,单击“选择文件 (…)”指定输出文件目标。
Optional. Toggle Remove secrets to omit passwords, access tokens, and other sensitive information from the exported file.可选。切换“删除机密”以从导出文件中省略密码、访问令牌和其他敏感信息。
If you select Remove secrets, you cannot specify an encryption password.如果选择“删除机密”,则无法指定加密密码。
Optional. Specify an Encryption Password to encrypt passwords, access tokens, and other sensitive information.可选。指定“加密密码”以加密密码、访问令牌和其他敏感信息。
If you do not encrypt the export file, passwords are exported in plaintext. Only export unencrypted connections if no other users will have access to the exported file.如果不加密导出文件,密码将以明文形式导出。只有当没有其他用户可以访问导出的文件时,才导出未加密的连接。
Click Export to export your saved connections to a JSON file.单击“导出”将保存的连接导出到JSON文件。
Next Steps后续步骤
To learn how to import saved connections, see Import Saved Connections in Compass.要了解如何导入已保存的连接,请参阅Compass中的导入已保存连接。