您的位置:首页 > 数据库 > Mongodb

MongoDB的备份方式

2015-03-30 20:37 225 查看

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

  --authenticationDatabase arg          user source (defaults to dbname)

  --authenticationMechanism arg (=MONGODB-CR)

                                        authentication mechanism

  --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                      each db is in a separate directly 

                                        (relevant only if dbpath specified)

  --journal                             enable journaling (relevant only if dbpath specified)

  -d [ --db ] arg                       database to use

  -c [ --collection ] arg               collection to use (some commands)

  -f [ --fields ] arg                   comma separated list of field names  e.g. -f name,age

  --fieldFile arg                       file with fields names - 1 per line

  -q [ --query ] arg                    query filter, as a JSON string

  --csv                                 export to csv instead of json

  -o [ --out ] arg                      output file; if not specified, stdout is used

  --jsonArray                           output to a json array rather than one object per line

  -k [ --slaveOk ] arg (=1)             use secondaries for export if available, default true

  --forceTableScan                      force a table scan (do not use $snapshot)

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: