Search code examples
marklogic

How to restore missing collections in database


I have a full backup over 50 million documents and set journal archiving to false. A developer is accidentally deleted two collections in database. How can I restore just two collections have been deleted. Thanks in advance.


Solution

  • You can't restore a backup selectively based on query criteria. You need to:

    1. Run a restore from a time period before the deletion
    2. Extract out the documents you want. I suggest using MLCP which can be extract by collection
    3. Move the docs into your production database. You can again use MLCP.

    In the future, you should consider backups with journal archiving which will ensure no data loss in a situation like this, because all history will be kept.