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

齿轮机械东莞网站建设技术支持热搜词排行榜关键词

齿轮机械东莞网站建设技术支持,热搜词排行榜关键词,轻极企业wordpress主题,外网登录 wordpress在一次数据更新中#xff0c;同事把老数据进行了清空操作#xff0c;但是新的逻辑数据由于某种原因#xff08;好像是她的电脑中病毒了#xff09;#xff0c;一直无法正常连接数据库进行数据插入#xff0c;然后下午2点左右要给甲方演示#xff0c;所以要紧急恢复本地的…在一次数据更新中同事把老数据进行了清空操作但是新的逻辑数据由于某种原因好像是她的电脑中病毒了一直无法正常连接数据库进行数据插入然后下午2点左右要给甲方演示所以要紧急恢复本地的部分数据到生产库。 在此之前我只用过 mongo 自带的命令 mongoexport 进行过导出操作把数据库的某个 collection 导出为 json 文件那么这次是要先导出再导入实现了一个完整的数据迁移闭环所以在此记录一下以备不时之需。 一、下载 mongo 工具包 mongo工具包包括管理数据的一些工具 exe 文件具体如下 mongoexport.exe导出数据命令工具mongoimport.exe导入数据命令工具bsondump.exe 用于将导出的BSON文件格式转换为JSON格式mongodump.exe 用于从mongodb数据库中导出BSON格式的文件类似于mysql的dump工具mysqldumpmongofiles.exe 用于和mongoDB的GridFS文件系统交互的命令并可操作其中的文件它提供了我们本地系统与GridFS文件系统之间的存储对象接口mongorestore.exe 用于恢复导出的BSON文件到 mongodb 数据库中mongostat.exe 当前 mongod 状态监控工具像linux中监控linux的vmstatmongotop.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\binmongoimport.exe -h localhost:28007 -u admin -p 123456 -d database -c result --file D:/project/result.json 2023-04-11T13:34:39.7990800 connected to: mongodb://localhost:28007/ 2023-04-11T13:34:42.7990800 [#######.................] database.result 20.2MB/66.4MB (30.4%) 2023-04-11T13:34:45.7990800 [##############..........] database.result 40.5MB/66.4MB (61.1%) 2023-04-11T13:34:48.7990800 [#####################...] database.result 60.4MB/66.4MB (91.0%) 2023-04-11T13:34:49.6600800 [########################] database.result 66.4MB/66.4MB (100.0%) 2023-04-11T13:34:49.6600800 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\binmongoimport --help Usage:mongoimport options connection-string fileImport CSV, TSV or JSON data into MongoDB. If no file is provided, mongoimport reads from stdin.Connection strings must begin with mongodb:// or mongodbsrv://.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. --verboseN)/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 servers 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 users 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 servers 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 ofcolName.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.zqtcl.cn/news/324149/

相关文章:

  • 河南专业做网站网站推广优化c重庆
  • 温州网站建设钱建设工程公司网站
  • 做笑话网站全国大学生职业生涯规划大赛官网
  • 便宜购 网站建设平台推广引流怎么做
  • 怎么用记事本做钓鱼网站制作公司网页的步骤
  • 机械设备东莞网站建设智慧软文网站
  • 个人网站需不需要搭建服务器蘑菇短视频2023版特色功能
  • 网站建设公司是什么东兰县建设局网站
  • 网站优化排名方案软件发布网
  • 企业网站开发价钱低企业策划案例
  • 网站建设帐号网站导入页欣赏
  • ftp 迁移 网站建筑公司商标logo设计
  • 没钱怎么做网站wordpress 链接修改插件
  • 建一个网站需要多久建设银行官网登录入口
  • 贸易公司网站制作邢台哪里做网站
  • 2018网站开发的革新帮别人起名 做ppt的网站
  • 有哪些做问卷调查赚钱的网站6长沙网站建设技术
  • 烟台做网站需要多少钱制作ppt的软件是什么
  • 泉州模板开发建站wordpress显示一个类目
  • 河南造价信息网官网为什么要做网站优化
  • 网站做个seo要多少钱做公司网站开发的公司
  • 企业网站html模板下载安装的字体wordpress
  • 庙行镇seo推广网站朋友圈的广告推广怎么弄
  • 网站打不开怎么办html怎么做网站背景
  • 厦门网站排名网络服务类型有哪些
  • 如何选择制作网站公司心雨在线高端网站建设专业
  • 山西做网站如何选择2万元最简单装修
  • 广丰区建设局网站友情链接发布网
  • 沧州做网站的专业公司python做网站视频
  • 管理外贸网站模板下载大数据营销优势