ubuntu - Starting mongodb with plain backup of previous /data/db contents -


i'be grabbed files /data/db dir other sever , trying start mongo on one. here files have:

-rw-------  1 root    root    1073741824 feb  2 11:21 j._0 drwxr-xr-x  2 mongodb nogroup       4096 may  3 12:02 journal -rw-------  1 root    root      67108864 feb 12 06:43 metadocs-node_db.0 -rw-------  1 root    root     134217728 jun 27  2012 metadocs-node_db.1 -rw-------  1 root    root      16777216 feb 12 06:43 metadocs-node_db.ns -rwxr-xr-x  1 mongodb nogroup          0 may  3 12:02 mongod.lock -rw-------  1 root    root    1073741824 aug 28  2012 prealloc.1 -rw-------  1 root    root    1073741824 aug 28  2012 prealloc.2 root@mtg:/var/lib/mongodb#  

while starting, (from logfile /var/log/mongodb/mongodb.log):

fri may  3 12:02:01 [initandlisten] options: { bind_ip: "127.0.0.1", config:  "/etc/mongodb.conf", dbpath: "/var/lib/mongodb",$ fri may  3 12:02:01 [initandlisten] journal dir=/var/lib/mongodb/journal fri may  3 12:02:01 [initandlisten] recover : no journal files present, no recovery needed fri may  3 12:02:01 [initandlisten] couldn't open /var/lib/mongodb/_metadocs-node_db.ns errno:13 permission denied fri may  3 12:02:01 [initandlisten] error couldn't open file /var/lib/mongodb/_metadocs-node_db.ns terminating fri may  3 12:02:01 dbexit: 

i'm running

sudo service mongodb start 

so, i'm doing wrong? files missing mongodb start? why i'm getting "permission denied"? working root, btw. no other instances of mongo running. thanks!

when starting mongodb service, packaged start script start mongod server under mongodb user. looking @ mongodb 2.4 init.d script mongod shows user "mongod". when setting data , log directories important mongodb user has read/write access directories , files contained within.


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -