
Here in the example below we mention the directory under D: is backup_data/backup/ folder. You can take the backup in specific directory by using the -out or -o option. Backup a Database with mongodump specify different output directory

So, it is better to ensure that, you no longer need the files in the output folder or you have taken a copy of the previous backup folder, before to run the mongodump command multiple times. : The mongodump command overwrites output files if they already exist in the backup data folder. Here is the output D:\mongodb\bin>mongodump -host mypc-PC -port 27017 D:\mongodb\bin>mongodump -host mypc-PC -port 27017 Here in the example below the host is mypc-PC and port is the default port 27017. T16:12:38.413+0530 DATABASE: admin to dump\adminīackup a Database with mongodump specify the -host and -port Here is the output D:\mongodb\bin>mongodump Here our path is D:\mongodb\bin and you have to execute the command from here. To take the backup you have to enter the bin directory into the mongodb folder on your machine. Here is the command to backup data from a mongod or mongos instance running on the same machine and on the default port of 27017. localhost) on port 27017 and creates a database backup named dump/ in the current directory. When mongodump only runs without any arguments, the command connects to the MongoDB instance on the local system (e.g. The backup utility of MongoDB can create a backup for an entire server, database or collection, or you can use a query to backup for a part of a collection. Here, in this article, we will describe the process for creating backups and restoring data using the utilities provided with MongoDB MongoDB Backup On that vital moment, you can keep safe by restoring your data if you have a backup of your valuable data.


This utility is important because your valuable data can be removed or crashed or corrupted from your server, your local machine by accidentally or by any mistake, whatever it may be. For example, changing a column to a type of date.īoth rows and columns can be split and merged, providing powerful re-structuring and de-duplication capabilities.The Backup and Restore in MongoDB is an important part to handle a database. Line break format automatically detected and changeable.Įxport to text (separated or fixed width), HTML, XML, and Excel directly.Ĭolumns can be given data types to allow correct sorting and filtering. For individual custom formats, the Import Wizard can be used to open any separated or fixed width format from a file or the clipboard.įull text encoding supported: Utf-7, Utf-8, Utf-16 and Utf-32 (both big endian and little endian), with automatic detection. Separators can be configured, to align with file extensions. This file editor allows total control over all of their content and structure. Ron's Editor is a powerful CSV file editor capable of opening any format of separated text, including the standard comma and tab separated files (CSV and TSV).
