Can I use the mongorestore and mongodump commands from Java or JavaFx?

I am new to JavaFX, so here is the script:

  • I have Mongo running as a windows service
  • I have JavaFX buttons for backing up and restoring databases in Mongo

Can I back up or restore the database by putting the code in onClickthe button method? Can someone tell me how to do this or provide code for this?

  • Way: "Path to Store Database Backup in My Computer"
  • Backup Method: public void bBackup() { /* Code for backup data */ }
  • Recovery Method: public void bRestore() { /* Code for restore data */ }
0
source share
1 answer

mongodbdump-java-wrapper, mongodump.exe mongorestore.exe mongodb java.

: github project. ( , /).

0

Source: https://habr.com/ru/post/1653897/


All Articles