-
Type: Question
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.4.0
-
Component/s: Storage
-
Environment:Windows
Dear Team,
We are using the compact command inorder to reduce the storage space of data and index.
We need your Support to confirm that 'data' folder backup creation is really required or not?
Below are the environment details
- mongodb Journals are enabled by default
- Mongod server version: db version v3.4.0
- OS: Windows 7, architecture: "x86", version: "6.1" , platform: "Java/OracleCorporation/1.8.0_162-b12"
As per the MongoDB documentation for Compact command, it is recommended to create a backup before performing Compact command. (Ref: https://docs.mongodb.com/manual/reference/command/compact/#dbcmd.compact)
However as per the MongoDB documentation, if we terminate the Compact command in between AND if journaling is enabled, it will be restored without any issue and we may have to rebuild the indexes (Ref: https://docs.mongodb.com/manual/reference/command/compact/#operation-termination)
To ensure that 'data' backup is not required , we have terminated the compact Operation while it is executing on the database collections with dataSize=68.8GiB, and observed that the both 'data' and 'index' remains valid and usable.
Could you please confirm whether backup is really necessary even if Journaling is enabled or not, Thank you.
Thanks & Regards
Sandeep KS