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)
Could you please confirm whether backup is really necessary even if Journaling is enabled or not, Thank you.
Thanks & Regards