http://www.iwangzheng.com/

[root@a02]$show dbs;
changhong_tv_cms 0.078GB

[root@a02]$ mongodump -d changhong_tv_cms -o
/temp/db_mongo.20140521.mongo /workspace/db_baks$ scp -r -P 22022
root@10.xxx.xx.xx:/temp/db_mongo_changhong.20140521.mongo . /workspace/db_baks$ mongorestore --directoryperdb
db_mongo_changhong.20140521.mongo

$ mongodump --help

options:
--help produce help message
-v [ --verbose ] be more verbose (include multiple times for more
verbosity e.g. -vvvvv)
--version print the program's version and exit
-h [ --host ] arg mongo host to connect to ( <set name>/s1,s2 for
sets)
--port arg server port. Can also use --host hostname:port
--ipv6 enable IPv6 support (disabled by default)
-u [ --username ] arg username
-p [ --password ] arg password
--dbpath arg directly access mongod database files in the given
path, instead of connecting to a mongod server -
needs to lock the data directory, so cannot be used
if a mongod is currently accessing the same path
--directoryperdb if dbpath specified, each db is in a separate
directory
--journal enable journaling
-d [ --db ] arg database to use
-c [ --collection ] arg collection to use (some commands)
-o [ --out ] arg (=dump) output directory or "-" for stdout
-q [ --query ] arg json query
--oplog Use oplog for point-in-time snapshotting
--repair try to recover a crashed database
--forceTableScan force a table scan (do not use $snapshot)

-h 导出源
-d 要导出的数据库名称
-o 数据库要导出的位置

mongo数据库的导入导出的更多相关文章

  1. mysql数据库的导入导出

    当我们在操作数据库的时候,难免会遇到数据导入导出的一些操作,今天突然学到了这个知识点,特意来给大家分享. 我用的是data的这条数据 1.使用数据 mysql> use data; Databa ...

  2. ORACLE数据库在导入导出时序列不一致的问题

    ORACLE数据库在导入导出时序列不一致的问题   在使用ORACLE数据库时,当给一个表设置自增字段时,我们经常会使用到序列+触发器来完成.但当你需要对数据库进行导入导出时,序列很容易出问题. 当你 ...

  3. oracle数据库数据导入导出步骤(入门)

    oracle数据库数据导入导出步骤(入门) 说明: 1.数据库数据导入导出方法有多种,可以通过exp/imp命令导入导出,也可以用第三方工具导出,如:PLSQL 2.如果熟悉命令,建议用exp/imp ...

  4. oracle数据库的导入 导出实例

    oracle数据库的导入 导出实例 分类: DataBase2011-09-07 23:25 377人阅读 评论(0) 收藏 举报 数据库oraclefileusercmdservice 我要从另外一 ...

  5. linux mysql 数据库操作导入导出 数据表导出导入

    linux mysql 数据库操作导入导出 数据表导出导入 1,数据库导入 mysql -uroot -p show databases; create database newdb; use 数据库 ...

  6. Linux数据库的导入导出

    Linux数据库的导入导出 1.导入数据库 mysql -u username -p test < /home/data/test.sql 说明:username是数据库用户名,test为目标数 ...

  7. oracle 中数据库完全导入导出:cmd命令行模式(转载)

    http://www.3lian.com/edu/2012/12-01/47252.html Oracle数据导入导出imp/exp就相当于oracle数据还原与备份.exp命令可以把数据从远程数据库 ...

  8. 《oracle每日一练》oralce数据库的导入导出

    今天尝试了数据库的导出,直接在命令行里面使用了导出指令: exp uname/pwd@127.0.0.1:1521/orcl  file='xx.dmp' 出现的问题: 直接@tnsnames里面配的 ...

  9. JAVA实现数据库数据导入/导出到Excel(POI)

    准备工作: 1.导入POI包:POI下载地址http://mirrors.tuna.tsinghua.edu.cn/apache/poi/release/src/(重要) 如下 2.导入Java界面美 ...

随机推荐

  1. shell编程之基础

    1.初探shell #!/bin/bash echo -e 'hello \nworld' 执行结果 echo 是打印输出字符,-e选项是开启转义功能 注意: 在windows下编写的shell脚本直 ...

  2. 第二十八课:focusin与focusout,submit,oninput事件的修复

    focusin与focusout 这两个事件是IE的私有实现,能冒泡,它代表获得焦点或失去焦点的事件.现在只有Firefox不支持focusin,focusout事件.其实另外两个事件focus和bl ...

  3. base-css

    html{ min-width: 320px;}body{ min-width: 320px; overflow-x:hidden }@media print { * { background: tr ...

  4. nginx 的中文配置详细解释

    文章转自:http://www.ha97.com/5194.html 更详细的模块参数请参考:http://wiki.nginx.org/Main #定义Nginx运行的用户和用户组 user www ...

  5. DELL R710服务器做RAID5磁盘阵列图文教程

    本文转载于:http://www.jb51.net/article/53707.htm,只为做笔记使用 同时我们还可以选择一块硬盘做热备盘,就是说当配的raid5中有一个硬盘坏了的时候,它立马顶上,然 ...

  6. 解决already defined in .obj 的问题(定义/声明的区别)

    首先需要搞清楚什么是定义(definition ),什么是声明(declaration). 一.函数 函数的声明: int myfunc(int a,int b); 定义: int myfunc(in ...

  7. 【CodeForces 489A】SwapSort

    题 Description In this problem your goal is to sort an array consisting of n integers in at most n sw ...

  8. BZOJ-1087 互不侵犯King 状压DP+DFS预处理

    1087: [SCOI2005]互不侵犯King Time Limit: 10 Sec Memory Limit: 162 MB Submit: 2337 Solved: 1366 [Submit][ ...

  9. DataSet筛选数据然后添加到新的DataSet中引发的一系列血案

    直入代码: var ds2 = new DataSet(); ) { ].Select(" usertype <> 'UU'"); ) { DataTable tmp ...

  10. [转] 计算几何模板Orz

    #include<math.h> #define MAXN 1000 #define offset 10000 #define eps 1e-8 #define PI acos(-1.0) ...