started after the replication start time and then synchronized with master.
After initializing the synchronization, slave periodically gets the latest action from Master's Oplog and then performs these operations on its own copy of the data, ensuring that the slave data is ultimately consistent with master.
Note: When the speed of the slave synchronization does not match the speed of the master Update, Oplog overwrites the old record because of an excessive amount of extra a
$ REMOTE_HOST first! "
Result = 'mysqladmin-h $ REMOTE_HOST -- password = $ REMOTE_PASSWORD create $ db'
If [! $ Result]; then
Echo "... Done! ";
Else
Echo "... Fialed! Check your configure plz! ";
Echo "Remote host said: $ result ";
Exit
Fi
;;
Local)
# Back up to localhost dir.
If [! -D $ DB_BACKUP_PATH]; then
Mkdir $ DB_BACKUP_PATH
Fi
Echo-n "[$ db]... Backup to local $ DB_BACKUP_PATH with gzip ";
If [-e "$ DB_BACKUP_PATH/mongod
A job backup, not a backup database, is a backup job.
My approach is to export the job as a file backup, because when your server maintenance more than a lot of your homework is very problematic, very troublesome.
It is best to be able to work to achieve synchronization, this is also the first step, saved into a file
MongoDB Study Notes (1)-install MongoDB on WindowsOverview
This document describes how to install MongoDB in Windows.
Official website of MongoDB: http://www.mongodb.org/. the latest version is 2.6.7.
Note:
MongoDB does not support Windows XP since Version 2.2. Use the lates
Label: this blog in the most concise way to record the blogger in the process of tossing mongodb drops, including the download MongoDB, configuration environment variables, how to start Mongodbserver, how to connect Mongodbserver and how to connect mongodbserver and so on. 1. Download MongoDBOfficial: Http://www.mongodb.org/downloads This machine is a Windows 7 32-bit. So the download is
Learning MongoDB 6: MongoDB query (cursor operation, cursor information) (3), mongodb cursorI. Introduction
Db. collection. find () can be used to query based on conditions and specify fields returned using the projection operator to omit this parameter to return all fields in the matching document. The cursor of the matching document is returned. You can modify
collection data from the MongoDB, you need to use the MongoDB find () method.
Pretty () methodThe results are shown in a format that can be used with the pretty () method.
Limit () methodTo limit the records in MongoDB, you need to use the limit () method. The limit () method accepts a numeric parameter, which is the number of documents to display.Grammar:
Th
1. Local backupCompile an automatic backup script:Vim/var/lib/mysql/autobakThe content is as follows:Copy codeThe Code is as follows:Cd/data/home/mysqlbakRq = 'date + % Y % m % d'/Usr/local/mysql/bin/mysqldump sqldb -- flush-logs-uroot-p123456 -- opt> 777city _ $ rq. SQLSave and exit.
Chmod-777/var/lib/mysql/autobak
Crontab-e00 00 ***/var/lib/mysql/autobakThe autobak script is automatically executed every morning./Etc/init. d/crontab restart
Manually
1. Retain for seven days
This setting only keeps backups for seven days.
RMAN> connect target/
Connected to target database: DBSID (DBID = 3100778490)
RMAN> configure retention policy to recovery window of 7 days;
2. Backup script
Vi/root/rmanbak. sh
#! /Bin/bash
Su-oracle
Rman target/
Backup as compressed backupset database
Include current controlfile format '/orabak/db _ % d _ % T _ % s'
P
1. Local backupCompile an automatic backup script:Vim/var/lib/mysql/autobakThe content is as follows:
Copy codeThe Code is as follows: cd/data/home/mysqlbak
Rq = 'date + % Y % m % d'
/Usr/local/mysql/bin/mysqldump sqldb -- flush-logs-uroot-p123456 -- opt> 777city _ $ rq. SQL
Save and exit.
Chmod-777/var/lib/mysql/autobak
Crontab-e00 00 ***/var/lib/mysql/autobakThe autobak script is automatically executed every morning./Etc/init. d/crontab restart
Manu
Principles of MongoDB replica set (I) and principles of mongodb Replication
References
Official Website: www.mongodb.org
Chinese community: www.mongoing.com
Online Tutorial: https://university.mongodb.com/
Mongodb supports the traditional master-slave architecture. There is no automatic failover function. You must specify the master and slave. We recommend that y
Label:Building a MongoDB server1. Download MongoDB installation files, this example according to the Mongod version of 2.6.5 as the standard mongodb-linux-x86_64-2.6.5, after the 2.6 version of the permissions of MongoDB enhanced. This is my Baidu cloud mongodb2.6.5 linux64 bit of resources file, can be downloaded acco
modifer allows MongoDB to have a function similar to Redis, Memcached, and other KV features: Compared with MySQL, MonoDB is simpler and faster. Modifier is also a container that MongoDB can use to track user behavior. In practice, Modifier is used to quickly save user interaction behaviors to MongoDB for later statistical analysis and customization.
High perfor
switched to DB stady > db.createcollection (' School ')//Create School collection {"OK": 1} > Db.school.insert ({"id": 1, "name": "Lisi", "Score": 90})//Insert data into the collection Writeresult ({"ninserted": 1}) > Db.school.fin D ()//view data in collection {"_id": ObjectId ("5b4843900edf47ef3aa006f3"), "id": 1, "name": "Lisi", "Score": > for (var i=2;iImport and export of data
Exporting data in a library[[emailprotected] mongodb]#mongoe
Tags: MongoDB replica setWhat is a MongoDB replica set:A MongoDB replica set is a cluster of replicas consisting of a set of MongoDB servers. The cluster contains a primary master server and several secondary backup servers or Artiber election servers. Secondary synchronizes
Logical backup (Data migration):Backup in Logical StructureMove data across usersMoving databases across databasesSave the original data state for the testVersion upgrade of a databaseConsiderations for Logical Export:EXP program in the directory found the same name file will be directly overwritten, do not prompt!!Exp cannot back up empty table with no segmentsBe sure to note the character set when perform
Java client operations to implement read/write splitting of replica sets, we need to make corresponding settings on the java client. The following is the core code of the java client. Of course, first, what we need to do is download the corresponding mongodb java driver
The above code is not a complete code. It is some of the core code. If you want to implement this, you can write it from a single server for read/write operations, the following is
The message "whether the local message password is lost or the chat record is backed up" is displayed. If yes, the message "saved on Q/msgbak/msgex_20090418163057.db" is displayed ". In this case, a file msgbak/msgex_20090418163057.db is generated after the backup (20090418163057 indicates the date on which the record is lost ), generally, it is stored in the msgbak folder (for example, C:/program files/qq2008 Pro/12345678/msgbak) of the QQ installati
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.