浏览代码

collection restore for mongodb

Divyansh Singh 2 年之前
父节点
当前提交
2fea429d78
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      borgmatic/hooks/mongodb.py

+ 3 - 0
borgmatic/hooks/mongodb.py

@@ -161,4 +161,7 @@ def build_restore_command(extract_process, database, dump_filename):
         command.extend(('--authenticationDatabase', database['authentication_database']))
     if 'restore_options' in database:
         command.extend(database['restore_options'].split(' '))
+    if database['schemas']:
+        for schema in database['schemas']:
+            command.extend(('--nsInclude', schema))
     return command