creating a back up:
before creating a back up make sure that you have the following folders that are created and dbpath is set:
to set the dbpath: >mongod.exe --dbpath "H:\data"
then you should have the following folders in the data directory:
1. db
2. log
3. backup
then run the command prompt in the administrators mode
1. press win+r and type cmd
2. hit ctrl+shift+enter(command prompt will be opened in the administrators mode)
3. change directory to the bin folder of the mongodb and type the below command:
>mongodump --dbpath /data/db --out /data/backup/
before creating a back up make sure that you have the following folders that are created and dbpath is set:
to set the dbpath: >mongod.exe --dbpath "H:\data"
then you should have the following folders in the data directory:
1. db
2. log
3. backup
then run the command prompt in the administrators mode
1. press win+r and type cmd
2. hit ctrl+shift+enter(command prompt will be opened in the administrators mode)
3. change directory to the bin folder of the mongodb and type the below command:
>mongodump --dbpath /data/db --out /data/backup/
No comments:
Post a Comment