Description: Below are the steps to take the backup of Infoworks DataFoundry metadata which is stored in MongoDB and to restore the same. 


Note: Ensure that you are restoring the metadata backup in the same version of Infoworks DataFoundry from which you took the backup.


Steps to take the backup of Infoworks DataFoundry metadata from MongoDB.


 Navigate to Admin >> Configurations >> Backup 

Provide the path where the MongoDB backup must be stored. By default backup schedule will be disabled, you could enable that and provide the date and time parameters so that backup could be taken at regular intervals (Refer the below article). 


https://infoworks.freshdesk.com/solution/articles/14000101362-how-to-schedule-mongo-backup


Steps to restore Infoworks DataFoundry metadata from a MongoDB backup file.


a) Login to the edge node as the user who starts Infoworks Services.

b) Navigate to $IW_HOME/bin and source the env.sh file.

For instance,


cd /opt/infoworks/bin
source env.sh

c) Unzip the mongo dumps tar file.

tar -xvf mongodump.tar.gz

d) Navigate to the unzipped folder. 


e) Run the below command
 
mongorestore -u <mongo-username> -p <mongo-password> --db infoworks-new <path-to-files-where-all-collection-files-are-there> --drop


Applicable Infoworks DataFoundry Versions:


v2.x,3.x,4.x, 5x