How to move mongodb database files from one server to another in Windows

How to move mongodb database files from one server to another in Windows - Make sure that mongod doesn’t run in the background. If it still runs, you can close it with ctrl c. - Create a folder named dataBackup in c: drive (or any other location that you prefer) - Run this command in Windows PowerShell (Admin) mongod --dbpath=“c:\dataBackup“ - Change the path to where you created your new data folder and make sure that you put the path inside the quote. - Exit mongod with ctrl c - Copy/cut & paste existing data from data folder into the new dataBackup folder - Make sure that the file is empty. Otherwise, you can delete it. This won’t damage anything and will be automatically regenerated when you run mongod. (When it’s not empty, it will throw an error & mongod will automatically shut down.) - Your existing data now should have been moved and you can start to get your data stored in the new directory when you work with one. 🌸 Support channel & make donation : 🌸 Subscribe for more videos : Youtube: 🌸 Follow me On Social Media Facebook : *********************************************************************** 🌸 How To Check Bad Blocks Or Bad Sectors On a Hard Disk In Linux 🌸 Linux How To Partition a Hard Drive Using the Parted Command 🌸 Checking or Repairing a File System using fsck in Linux 🌸 How To Monitor the Health of Your Hard Drive in Linux using SMART 🌸 Linux iotop: Monitor your disk Input/Output 🌸 How To use the “du” (Disk Usage) Command in Linux 🌸 How To View Manipulate System Logs In Linux Using Journalctl Command 🌸 How To Sync And Backup Files In Linux Using Rsync Command 🌸 Linux cURL Command Tips and Tricks 🌸 Linux tail and multitail commands 🌸 Linux How To view Log Files 🌸 How To use the History Command On Linux 🌸 Tips and Tricks How To manipulate Text Files on Linux 🌸 How to Archive, Compress and Extract Files Using the tar Command on Linux 🌸 Linux - How to split larger files into smaller parts 🌸 Linux commands : Top *********************************************************************** #Mongodb#Windows#Database
Back to Top