with nonWiredTiger storage engine we often use option to copy ONLY the database files to another folder/instance, execute mongod under new folder, and everything works OK. (backup/restore strategy)
In WiredTiger, after copy all database files (except WiredTiger.*, storage.bson, sizeStorer.wt and _mdb_catalog.wt) to new database folder, the mongod doesn`t see those files and totally ignore them.
Does somebody have solution/workarround to this ?
Are you changing the config file to match the new dbpath?
Unlike MMAPv1 storage, Wired Tiger doesn't store each database in a collection of files. It stores your databases as logical collections. Because of this, a backup can't be taken by merely copying the collection and index files. You have to copy the entire database directory (including storage.bson and the WiredTiger* files) to get a backup.
Or are you telling mongod on start where the new path is?
Are you getting any errors or warnings? What does the error log say? What version of MongoDB are you on?
Ok, the question about the version wasn't really necessary. LOL!
Unlike MMAPv1 storage, Wired Tiger doesn't store each database in a collection of files. It stores your databases as logical collections. Because of this, a backup can't be taken by merely copying the collection and index files. You have to copy the entire database directory (including storage.bson and the WiredTiger* files) to get a backup.
thanks a lot for clear message. Is there a way how to join 2 databases ? I mean 1 DB is running under wiredtiger folder1/instance1 and 2nd running under another wiredtiger folder2/instance2. Now I would like to run both databases under one folder/instance. (the solution - backup/restore - is sometimes not applicable if the restore takes 2 days (many indexes)).
How to create the storage.bson and the WiredTiger* files from both databases
댓글 없음:
댓글 쓰기