Tags: share com 9.png ups Account form mil path file nameDescription: All operations in this article are in the MongoDB3.4.4 version under win7 . First, backup and recovery 1. Backup: Mongodump-h IP--port Port- u user name - p password - d database - o c9> file path (a user account will be used to back up a database on a MONGODB server to a path) If you do not
Tags: server database ReaderOne, the whole library backup:Mongodump-h dbhost-d Dbname-o dbdirectory-H:MONGDB the server address, for example: 127.0.0.1, you can also specify the port number: 127.0.0.1:27017-D: The database instance that needs to be backed up, for example: test-O: The data storage location of the backup, for example: C:\data\dump, of course, the directory needs to be established in advance, after the
First, backup 1. Lock the database:Use adminDb.runcommand ({fsync:1,lock:1}){"Info": "Now locked against writes, use Db.fsyncunlock () to unlock"," seealso": "Http://www.mongodb.org/display/DOCS/fsync+Command","OK": 1}Fsync: Forcing all buffers to be written to diskLock: Locked, unable to write (all write operations will block)2. Start Backup ... mongodump-d mailaccess-c mail-q ' {User: "[email protected]"}
In the previous study of MongoDB (iii), how to import and export data on the server side and restore the backup, this article describes how to use the Client tool for remote server data backup to local.Take the client tool Mongovue as an example to explain:1. Connect the local server and the remote server database first2. In the local server (127.0.0.1), right-cl
-collection Note the place
Mongoimport before the import, the new database does not have the same XX table can be imported successfully;
Mongoexport and Mongoimport The order of each parameter input is not strict;
For a replica set, the data export of Mongoexport can be a primary node in a replica set, or it can be a secondary node;
For a replica set, the data import of Mongoimport must be a primary node;
For the export of large data volume, there is no production pro
, support JS syntax
Mongod.exe: Service Side
Mongodump.exe: Backup tool
Mongorestore.exe: Recovery Tool
Mongoexport.exe: Export Tool
Mongoimport.exe: Import Tool
Mongostat.exe: Real-time performance monitoring tool
Mongotop.exe: Tracking Mongdb Instance read-Write Time tool
More detailed explanations or actions can be viewed: http://docs.mongodb.org/man
in the cmd window, or you can do so in the control Panel \ All Control Panel items \ Administrative Tools \ Servicesnet start MongoDBTest connectionRun the following command in CMD to view the resultsMongo Installation is successful!The last two steps are not required; MongoDB default port is 27017, can be modified!For the "C:\Program Files\mongodb 2.6 standard\bin" directory under the EXE program, do a s
restore the database. This method is simple and clear.
Follow these steps:
1. Lock the database or shut down the database.
2. copy the data file to the corresponding directory.
3. Unlock the database or restart the database.
Note: If you only need to copy the database named test, you can copy all test.
4.1: how to lock the databaseTo prevent problems caused by changes in data files during backup, use the following command to lock the database:
Db
, analysis
Use Cacti to monitor MongoDB and Redis
10 Gen releases the MongoDB Monitoring System MMS (attached tutorial)
MongoSpy, MongoWatch, and MongoDB Data Compression
Warning: Considerations for MongoDB Replica Sets Configuration
MongoDB deployment and O M
reduce the pressure on the master server, you can back up the backup or anything from the server (for example, if the data is large, a backup will increase the pressure on the master server by dozens of minutes ):./Mongodump -- port 20002-d test backup test Database** In this way, the master server can be operated during addition, deletion, and modification, and
1.
Back up database
Concept: it refers to backing up all data files and control files of the database, and also backing up parameter files and password files.
Note: When backing up a database, do not back up redo logs.
1.1
Consistent backup
Concept: Database Consistency backup refers to the method for backing up all data files and control files after the database is disabled. When the SHUTDOWN command is u
insufficient, the index hit rate is low, and the query efficiency is reduced.Currently, the version we use is not very effective.You can use dB. repairedatabase () to sort databases. This process is very slow.In master-slave mode, the master-slave switchover is performed, and the slave database is created again.In a replset architecture, you can stop the database, delete the data directory, and synchronize all data from the replication group,In this case, the oplog size should be considered.A g
authentication is performed, so nothing can be done. After using the test database and performing user authentication, you can view the set in the test database, because test1 can only read and write, therefore, "find" can be successful but "insert" fails. test2 can both read and write data. After using the admin database for user authentication, you can view the list of all databases. In fact, this authentication is not very useful. It is only a method. The safest way is to restrict access.
3)
1. System Backup
Based on the degree of preparation of the backup system, it can be divided into three categories: Cold backup, warm backup and hot backup.
1.1 The cold backup system is not installed or configured to the same or s
the collection in the test library because Test1 can only read and not write, so find succeeds and insert fails. Test2 can read and write, and use the Admin database for user authentication to view all database lists. In fact, the use of such certification is not very large, but only a way, the safest way is to restrict access. 3). Data Backup①. Data file backupThe simplest backup is the data file
Tags: sqlAccident background:suddenly the database is corrupted for no apparent reason, and differential or transaction log backups 3 point will be automatically done, then how to 2 Point to 2 Point + data recovery between the ? this needs to be restored by backing up the tail log. Environment Description:A company has installed aSQL Serverdatabase, in order to ensure that the database can be repaired in the event of a failure, the administrator has done ba
/ 3. Start a single instance MongoDBMongod--dbpath /data/mongodbtest/single/data Output log as follows, Success! [Initandlisten] DB version v2.4.6........[Initandlisten] Waiting for connections on port 27017[WEBSVR] Admin Web console waiting for connections on port 28017 The MongoDB default comes with a Web access interface that can be accessed in the form of IP + ports. http://192.168.0.1:28017/ second, master-slave mode . The use of My
..... [Initandlisten] Waiting for connections on port 27017 [websvr] Admin Web console waiting for connections on por T 28017The MongoDB default comes with a Web access interface that can be accessed in the form of IP + ports.http://192.168.0.1:28017/second, master-slave mode . The use of MySQL database is widely used, the use of dual-machine backup of the main node hung off after the node can take over th
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.