📜  创建和恢复 MongoDB 备份 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:01.691000             🧑  作者: Mango

代码示例1
# Backup
mongodump --authenticationDatabase admin --username root --password PASSWORD -d DATABASE_NAME -h localhost

# Restore
mongorestore --authenticationDatabase admin --username root --password PASSWORD PATH_TO_BACKUP_FILE