mongodb備份還原的方法

來源:互聯網
上載者:User

--備份

1、備份到預設資料夾中


D:\mongodb\bin 是mongodb的安裝目錄

mongodump -d 是備份資料庫命令

testdb 資料庫名稱

備份的資料庫在mongodb安裝目錄下的dump檔案夾中


2、備份到指定檔案夾中


D:\mongodb\bin 是mongodb的安裝目錄

mongodump -d 是備份資料庫命令

testdb 資料庫名稱

備份的資料庫在mongodb安裝目錄下的backup檔案夾中



--刪除資料庫


--還原資料庫


相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.