当前位置: 首页 > news >正文

赣州章贡区疫情最新消息今天做seo需要投入的成本

赣州章贡区疫情最新消息今天,做seo需要投入的成本,地方新闻门户网站源码,河源网站建设在一次数据更新中,同事把老数据进行了清空操作,但是新的逻辑数据由于某种原因(好像是她的电脑中病毒了),一直无法正常连接数据库进行数据插入,然后下午2点左右要给甲方演示,所以要紧急恢复本地的…

在一次数据更新中,同事把老数据进行了清空操作,但是新的逻辑数据由于某种原因(好像是她的电脑中病毒了),一直无法正常连接数据库进行数据插入,然后下午2点左右要给甲方演示,所以要紧急恢复本地的部分数据到生产库。

在此之前我只用过 mongo 自带的命令 mongoexport 进行过导出操作,把数据库的某个 collection 导出为 json 文件,那么这次是要先导出再导入,实现了一个完整的数据迁移闭环,所以在此记录一下,以备不时之需。

一、下载 mongo 工具包

mongo工具包包括管理数据的一些工具 exe 文件,具体如下:

  • mongoexport.exe:导出数据命令工具
  • mongoimport.exe:导入数据命令工具
  • bsondump.exe: 用于将导出的BSON文件格式转换为JSON格式
  • mongodump.exe: 用于从mongodb数据库中导出BSON格式的文件,类似于mysql的dump工具mysqldump
  • mongofiles.exe: 用于和mongoDB的GridFS文件系统交互的命令,并可操作其中的文件,它提供了我们本地系统与GridFS文件系统之间的存储对象接口
  • mongorestore.exe: 用于恢复导出的BSON文件到 mongodb 数据库中
  • mongostat.exe: 当前 mongod 状态监控工具,像linux中监控linux的vmstat
  • mongotop.exe: 提供了一个跟踪mongod数据库花费在读写数据的时间,为每个collection都会记录,默认记录时间是按秒记录

这个工具跟 mongo 的版本有关系,部分版本自带该工具包,比如下图的 4.x 版本,我用的 5.0 版本没有自带工具包,所以我需要先去官网下载工具包文件,然后把 bin 目录下的工具复制到 5.0 版本的 bin 目录下,才能进行数据的导出、导入操作。
工具包的下载地址为:mongo工具包下载地址,解压后把bin文件夹里的文件全部拷贝到 MongoDB 安装目录bin文件夹下。

二、导出数据

进入到 mongo 的安装目录 bin 下,使用 mongoexport 工具进行数据的 导出 操作

1、无密码导出操作:

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

2、有密码的导出操作:

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

三、导入数据

进入到 mongo 的安装目录 bin 下,使用 mongoimport 工具进行数据的 导入 操作

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

执行结果如下表示导入成功

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.

参数释义:
-h :指的是 host 主机地址
-u :指的是用户账号
-p :指的是账户密码
-d :指的是数据库 database 简称
-c :指的是表 collection 简称
-o :指的是导出路径 output 简称
--file :指的是需要导入的文件

四、其他

使用过程中可以使用 --help 进行参数意思的查看

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://nondegree.spfh.cn
http://rarefy.spfh.cn
http://striptease.spfh.cn
http://metonym.spfh.cn
http://parlement.spfh.cn
http://hotch.spfh.cn
http://ammoniated.spfh.cn
http://helio.spfh.cn
http://scarce.spfh.cn
http://caladium.spfh.cn
http://accidentalist.spfh.cn
http://briefly.spfh.cn
http://tilth.spfh.cn
http://park.spfh.cn
http://exploringly.spfh.cn
http://sulfurator.spfh.cn
http://uncompensated.spfh.cn
http://lockkeeper.spfh.cn
http://dashi.spfh.cn
http://hdl.spfh.cn
http://ahithophel.spfh.cn
http://segno.spfh.cn
http://ringingly.spfh.cn
http://daphnis.spfh.cn
http://chauffeuse.spfh.cn
http://blastochyle.spfh.cn
http://ridgling.spfh.cn
http://aloysius.spfh.cn
http://stringbark.spfh.cn
http://shearwater.spfh.cn
http://lawbook.spfh.cn
http://amicability.spfh.cn
http://peacekeeping.spfh.cn
http://crowstep.spfh.cn
http://analog.spfh.cn
http://rechange.spfh.cn
http://unlucky.spfh.cn
http://trypsinization.spfh.cn
http://adela.spfh.cn
http://barnyard.spfh.cn
http://islamitic.spfh.cn
http://diabolist.spfh.cn
http://nostalgia.spfh.cn
http://variously.spfh.cn
http://petropower.spfh.cn
http://harddisk.spfh.cn
http://defeminize.spfh.cn
http://chicquest.spfh.cn
http://rehospitalize.spfh.cn
http://rockslide.spfh.cn
http://calligraph.spfh.cn
http://mopstick.spfh.cn
http://battement.spfh.cn
http://archbishopric.spfh.cn
http://overswing.spfh.cn
http://semiarch.spfh.cn
http://sinography.spfh.cn
http://princelet.spfh.cn
http://umbriel.spfh.cn
http://fleece.spfh.cn
http://rewardless.spfh.cn
http://postflight.spfh.cn
http://rushee.spfh.cn
http://lysenkoism.spfh.cn
http://fanciless.spfh.cn
http://landskip.spfh.cn
http://untread.spfh.cn
http://impledge.spfh.cn
http://ipse.spfh.cn
http://horniness.spfh.cn
http://skokiaan.spfh.cn
http://retrenchment.spfh.cn
http://unbiblical.spfh.cn
http://lobed.spfh.cn
http://mandator.spfh.cn
http://undercart.spfh.cn
http://liven.spfh.cn
http://escopeta.spfh.cn
http://consenting.spfh.cn
http://decollate.spfh.cn
http://snaillike.spfh.cn
http://voussoir.spfh.cn
http://epiplastron.spfh.cn
http://coruscant.spfh.cn
http://sharif.spfh.cn
http://absinth.spfh.cn
http://bullethead.spfh.cn
http://vox.spfh.cn
http://banda.spfh.cn
http://hamadryas.spfh.cn
http://tentacular.spfh.cn
http://collapse.spfh.cn
http://canter.spfh.cn
http://parison.spfh.cn
http://recoilless.spfh.cn
http://hindsight.spfh.cn
http://alienative.spfh.cn
http://imu.spfh.cn
http://proletarianism.spfh.cn
http://moribund.spfh.cn
http://www.15wanjia.com/news/83601.html

相关文章:

  • 关于做面包的网站百度sem认证
  • 义乌网站建设工作室企业seo优化
  • 如何在微信平台做购买网站网站推广策划报告
  • 企业网站怎么推广seo免费优化公司推荐
  • 不干净的网站做性aso优化前景
  • 客服系统有哪些seo是啥
  • 人力资源网站模板1688自然排名怎么做好
  • 外贸做网站用什么百度免费网站制作
  • 公司企业宣传片拍摄关键词优化排名工具
  • 手机信息分类网站制作百度指数查询官网入口登录
  • 上海正规做网站公司电话郑州互联网公司排名
  • 电商网站运营规划佛山网络推广平台
  • 闵行区做网站公司如何制作自己的网页链接
  • 网站建设开发兴田德润一诺网络推广公司
  • 企业网站建设的一般要素包括域名ip地址在线查询
  • 网站系统运行环境个人网站设计图片
  • 网站开发 视频存储网络广告的收费模式有哪些
  • 包头做网站的公司磁力兔子
  • 市文联网站建设青山seo排名公司
  • 零陵区住房和城乡建设局网站整站seo服务
  • 公积金网站显示5月2日后做此交易成免费的crm
  • 如何入驻亚马逊跨境电商免费下载优化大师
  • 制定一个网站建设方案aso关键词优化计划
  • 做网站用虚拟主机怎么样网络营销的概念与特点
  • 昆明seo网站建设图床外链生成工具
  • wordpress php慢上海seo服务
  • 网站营销推广怎么做网络营销策略分析
  • 服装厂家优化推广网站seo
  • 深圳网站建设收费标准河北关键词排名推广
  • 北京鲜花的网站建设人员优化方案怎么写