中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

廣州設(shè)計(jì)公司網(wǎng)站黃頁網(wǎng)絡(luò)的推廣網(wǎng)站有哪些軟件

廣州設(shè)計(jì)公司網(wǎng)站,黃頁網(wǎng)絡(luò)的推廣網(wǎng)站有哪些軟件,網(wǎng)站建設(shè)需怎么做,做企業(yè)網(wǎng)站一定要企業(yè)郵箱嘛在一次數(shù)據(jù)更新中,同事把老數(shù)據(jù)進(jìn)行了清空操作,但是新的邏輯數(shù)據(jù)由于某種原因(好像是她的電腦中病毒了),一直無法正常連接數(shù)據(jù)庫進(jìn)行數(shù)據(jù)插入,然后下午2點(diǎn)左右要給甲方演示,所以要緊急恢復(fù)本地的…

在一次數(shù)據(jù)更新中,同事把老數(shù)據(jù)進(jìn)行了清空操作,但是新的邏輯數(shù)據(jù)由于某種原因(好像是她的電腦中病毒了),一直無法正常連接數(shù)據(jù)庫進(jìn)行數(shù)據(jù)插入,然后下午2點(diǎn)左右要給甲方演示,所以要緊急恢復(fù)本地的部分?jǐn)?shù)據(jù)到生產(chǎn)庫。

在此之前我只用過 mongo 自帶的命令 mongoexport 進(jìn)行過導(dǎo)出操作,把數(shù)據(jù)庫的某個(gè) collection 導(dǎo)出為 json 文件,那么這次是要先導(dǎo)出再導(dǎo)入,實(shí)現(xiàn)了一個(gè)完整的數(shù)據(jù)遷移閉環(huán),所以在此記錄一下,以備不時(shí)之需。

一、下載 mongo 工具包

mongo工具包包括管理數(shù)據(jù)的一些工具 exe 文件,具體如下:

  • mongoexport.exe:導(dǎo)出數(shù)據(jù)命令工具
  • mongoimport.exe:導(dǎo)入數(shù)據(jù)命令工具
  • bsondump.exe: 用于將導(dǎo)出的BSON文件格式轉(zhuǎn)換為JSON格式
  • mongodump.exe: 用于從mongodb數(shù)據(jù)庫中導(dǎo)出BSON格式的文件,類似于mysql的dump工具mysqldump
  • mongofiles.exe: 用于和mongoDB的GridFS文件系統(tǒng)交互的命令,并可操作其中的文件,它提供了我們本地系統(tǒng)與GridFS文件系統(tǒng)之間的存儲(chǔ)對(duì)象接口
  • mongorestore.exe: 用于恢復(fù)導(dǎo)出的BSON文件到 mongodb 數(shù)據(jù)庫中
  • mongostat.exe: 當(dāng)前 mongod 狀態(tài)監(jiān)控工具,像linux中監(jiān)控linux的vmstat
  • mongotop.exe: 提供了一個(gè)跟蹤mongod數(shù)據(jù)庫花費(fèi)在讀寫數(shù)據(jù)的時(shí)間,為每個(gè)collection都會(huì)記錄,默認(rèn)記錄時(shí)間是按秒記錄

這個(gè)工具跟 mongo 的版本有關(guān)系,部分版本自帶該工具包,比如下圖的 4.x 版本,我用的 5.0 版本沒有自帶工具包,所以我需要先去官網(wǎng)下載工具包文件,然后把 bin 目錄下的工具復(fù)制到 5.0 版本的 bin 目錄下,才能進(jìn)行數(shù)據(jù)的導(dǎo)出、導(dǎo)入操作。
工具包的下載地址為:mongo工具包下載地址,解壓后把bin文件夾里的文件全部拷貝到 MongoDB 安裝目錄bin文件夾下。

二、導(dǎo)出數(shù)據(jù)

進(jìn)入到 mongo 的安裝目錄 bin 下,使用 mongoexport 工具進(jìn)行數(shù)據(jù)的 導(dǎo)出 操作

1、無密碼導(dǎo)出操作:

mongoexport.exe -h localhost:28007 -d database  -c result -o D:/project/result.json

2、有密碼的導(dǎo)出操作:

mongoexport.exe -h localhost:28007 -d database -u admin  -p 123456  -c result -o D:/project/result.json

三、導(dǎo)入數(shù)據(jù)

進(jìn)入到 mongo 的安裝目錄 bin 下,使用 mongoimport 工具進(jìn)行數(shù)據(jù)的 導(dǎo)入 操作

mongoimport.exe -h localhost:28007 -u admin -p 123456 -d database -c result --file D:/project/result.json

執(zhí)行結(jié)果如下表示導(dǎo)入成功

D:\MongoDB\Server\5.0\bin>mongoimport.exe -h localhost:28007 -u admin -p 123456 -d database -c result --file D:/project/result.json
2023-04-11T13:34:39.799+0800    connected to: mongodb://localhost:28007/
2023-04-11T13:34:42.799+0800    [#######.................] database.result 20.2MB/66.4MB (30.4%)
2023-04-11T13:34:45.799+0800    [##############..........] database.result 40.5MB/66.4MB (61.1%)
2023-04-11T13:34:48.799+0800    [#####################...] database.result 60.4MB/66.4MB (91.0%)
2023-04-11T13:34:49.660+0800    [########################] database.result 66.4MB/66.4MB (100.0%)
2023-04-11T13:34:49.660+0800    386810 document(s) imported successfully. 0 document(s) failed to import.

參數(shù)釋義:
-h :指的是 host 主機(jī)地址
-u :指的是用戶賬號(hào)
-p :指的是賬戶密碼
-d :指的是數(shù)據(jù)庫 database 簡(jiǎn)稱
-c :指的是表 collection 簡(jiǎn)稱
-o :指的是導(dǎo)出路徑 output 簡(jiǎn)稱
--file :指的是需要導(dǎo)入的文件

四、其他

使用過程中可以使用 --help 進(jìn)行參數(shù)意思的查看

D:\MongoDB\Server\5.0\bin>mongoimport --help
Usage:mongoimport <options> <connection-string> <file>Import CSV, TSV or JSON data into MongoDB. If no file is provided, mongoimport reads from stdin.Connection strings must begin with mongodb:// or mongodb+srv://.See http://docs.mongodb.com/database-tools/mongoimport/ for more information.general options:/help                                       print usage/version                                    print the tool version and exit/config:                                    path to a configuration fileverbosity options:/v, /verbose:<level>                            more detailed log output (include multiple times for more verbosity,e.g. -vvvvv, or specify a numeric value, e.g. --verbose=N)/quiet                                      hide all log outputconnection options:/h, /host:<hostname>                            mongodb host to connect to (setname/host1,host2 for replica sets)/port:<port>                                server port (can also use --host hostname:port)ssl options:/ssl                                        connect to a mongod or mongos that has ssl enabled/sslCAFile:<filename>                       the .pem file containing the root certificate chain from thecertificate authority/sslPEMKeyFile:<filename>                   the .pem file containing the certificate and key/sslPEMKeyPassword:<password>               the password to decrypt the sslPEMKeyFile, if necessary/sslCRLFile:<filename>                      the .pem file containing the certificate revocation list/sslFIPSMode                                use FIPS mode of the installed openssl library/tlsInsecure                                bypass the validation for server's certificate chain and host nameauthentication options:/u, /username:<username>                        username for authentication/p, /password:<password>                        password for authentication/authenticationDatabase:<database-name>     database that holds the user's credentials/authenticationMechanism:<mechanism>        authentication mechanism to use/awsSessionToken:<aws-session-token>        session token to authenticate via AWS IAMkerberos options:/gssapiServiceName:<service-name>           service name to use when authenticating using GSSAPI/Kerberos(default: mongodb)/gssapiHostName:<host-name>                 hostname to use when authenticating using GSSAPI/Kerberos (default:<remote server's address>)namespace options:/d, /db:<database-name>                         database to use/c, /collection:<collection-name>               collection to useuri options:/uri:mongodb-uri                            mongodb uri connection stringinput options:/f, /fields:<field>[,<field>]*                  comma separated list of fields, e.g. -f name,age/fieldFile:<filename>                       file with field names - 1 per line/file:<filename>                            file to import from; if not specified, stdin is used/headerline                                 use first line in input source as the field list (CSV and TSV only)/jsonArray                                  treat input source as a JSON array/parseGrace:<grace>                         controls behavior when type coercion fails - one of: autoCast,skipField, skipRow, stop (default: stop)/type:<type>                                input format to import: json, csv, or tsv/columnsHaveTypes                           indicates that the field list (from --fields, --fieldsFile, or--headerline) specifies types; They must be in the form of'<colName>.<type>(<arg>)'. The type can be one of: auto, binary,boolean, date, date_go, date_ms, date_oracle, decimal, double, int32,int64, string. For each of the date types, the argument is a datetimelayout string. For the binary type, the argument can be one of:base32, base64, hex. All other types take an empty argument. Onlyvalid for CSV and TSV imports. e.g. zipcode.string(),thumbnail.binary(base64)/legacy                                     use the legacy extended JSON format/useArrayIndexFields                        indicates that field names may include array indexes that should beused to construct arrays during import (e.g. foo.0,foo.1). Indexesmust start from 0 and increase sequentially (foo.1,foo.0 would fail).ingest options:/drop                                       drop collection before inserting documents/ignoreBlanks                               ignore fields with empty values in CSV and TSV/maintainInsertionOrder                     insert the documents in the order of their appearance in the inputsource. By default the insertions will be performed in an arbitraryorder. Setting this flag also enables the behavior of --stopOnErrorand restricts NumInsertionWorkers to 1./j, /numInsertionWorkers:<number>               number of insert operations to run concurrently/stopOnError                                halt after encountering any error during importing. By default,mongoimport will attempt to continue through document validation andDuplicateKey errors, but with this option enabled, the tool will stopinstead. A small number of documents may be inserted afterencountering an error even with this option enabled; use--maintainInsertionOrder to halt immediately after an error/mode:[insert|upsert|merge|delete]          insert: insert only, skips matching documents. upsert: insert newdocuments or replace existing documents. merge: insert new documentsor modify existing documents. delete: deletes matching documentsonly. If upsert fields match more than one document, only onedocument is deleted. (default: insert)/upsertFields:<field>[,<field>]*            comma-separated fields for the query part when --mode is set toupsert or merge/writeConcern:<write-concern-specifier>     write concern options e.g. --writeConcern majority, --writeConcern'{w: 3, wtimeout: 500, fsync: true, j: true}'/bypassDocumentValidation                   bypass document validation
http://www.risenshineclean.com/news/4315.html

相關(guān)文章:

  • 中山技術(shù)支持中山網(wǎng)站建設(shè)做電商必備的幾個(gè)軟件
  • 手機(jī)網(wǎng)絡(luò)營(yíng)銷方案優(yōu)秀網(wǎng)站seo報(bào)價(jià)
  • 長(zhǎng)沙百度網(wǎng)站制作哪里有網(wǎng)頁設(shè)計(jì)公司
  • 麗水專業(yè)網(wǎng)站建設(shè)公司百度網(wǎng)站站長(zhǎng)工具
  • 長(zhǎng)春?jiǎn)⒆鼍W(wǎng)站多少廣州網(wǎng)站營(yíng)銷seo
  • 重慶企業(yè)網(wǎng)站建設(shè)聯(lián)系電話公司網(wǎng)絡(luò)推廣的作用
  • 網(wǎng)站關(guān)鍵詞優(yōu)化方法西安優(yōu)化外
  • 青島網(wǎng)站開發(fā)公司一份完整的電商運(yùn)營(yíng)方案
  • lazada網(wǎng)站seo運(yùn)營(yíng)
  • 海外公司網(wǎng)站 國(guó)內(nèi)做備案美國(guó)婚戀網(wǎng)站排名
  • 注冊(cè)個(gè)人網(wǎng)站要多少錢寧波關(guān)鍵詞優(yōu)化時(shí)間
  • 電子商務(wù)網(wǎng)站建設(shè)漢獅網(wǎng)站權(quán)重查詢工具
  • 淮安做網(wǎng)站的有多少站長(zhǎng)之家音效
  • 小程序加盟平臺(tái)快速排名優(yōu)化
  • 免費(fèi)php網(wǎng)站模板下載北京百度推廣電話號(hào)碼
  • 有個(gè)在家做的客服網(wǎng)站營(yíng)銷型網(wǎng)站建站推廣
  • 網(wǎng)站標(biāo)題分隔符搜索引擎競(jìng)價(jià)排名
  • 地產(chǎn)公司做網(wǎng)站維護(hù)寫代碼么莆田百度seo公司
  • wordpress密碼忘記了百度問答優(yōu)化
  • 宿州網(wǎng)站建設(shè)哪家公司好新聞軟文范例大全
  • 可信賴的武漢網(wǎng)站建設(shè)信息如何優(yōu)化上百度首頁公司
  • 網(wǎng)站建設(shè)如何交稅南京seo報(bào)價(jià)
  • 校園網(wǎng)站設(shè)計(jì)全網(wǎng)seo優(yōu)化電話
  • 如何做屬于自己的領(lǐng)券網(wǎng)站長(zhǎng)安seo排名優(yōu)化培訓(xùn)
  • 新鄭做網(wǎng)站seo專業(yè)培訓(xùn)費(fèi)用
  • 南昌網(wǎng)站設(shè)計(jì)制作品牌推廣文案
  • 網(wǎng)站百度不收錄怎么做好網(wǎng)絡(luò)銷售
  • 做網(wǎng)站建設(shè)銷售員準(zhǔn)備什么企業(yè)培訓(xùn)課程設(shè)置
  • 百度廣告搜索推廣江蘇網(wǎng)站seo
  • 地稅城市維護(hù)建設(shè)稅網(wǎng)站是什么3a汽車集團(tuán)公司網(wǎng)絡(luò)營(yíng)銷方案