[SERVER-16833] wt "backup" command fails when run against a mongod with wiredTiger storage engine's dbpath Created: 13/Jan/15  Updated: 06/Dec/22  Resolved: 06/Sep/16

Status: Closed
Project: Core Server
Component/s: Storage, WiredTiger
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Michael O'Brien Assignee: Backlog - Storage Execution Team
Resolution: Duplicate Votes: 1
Labels: 28qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates WT-1559 backup log URIs need to use log path Backlog
Related
Assigned Teams:
Storage Execution
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

to repro:

1) start up a mongod with --storageEngine=wiredTiger
2) insert some data
3) shut it down.
4) use the "wt" command to try to generate a backup:

./wt -C "extensions=[./ext/compressors/snappy/.libs/libwiredtiger_snappy.so]" -h /data/db/copied_path2/ backup /tmp
lt-wt: /data/db/copied_path2//WiredTigerLog.0000000011: No such file or directory

The file that it looks for is actually in journal/ within the specified path, but the WT command won't look in there. It still won't work even when trying to specifically point it to journal/ :

$ ./wt -C "extensions=[./ext/compressors/snappy/.libs/libwiredtiger_snappy.so],log=(path=journal)" -h /data/db/copied_path2 backup /tmp/
lt-wt: /data/db/copied_path2/WiredTigerLog.0000000015: No such file or directory
 
$ ./wt -C "extensions=[./ext/compressors/snappy/.libs/libwiredtiger_snappy.so]" -h /data/db/copied_path2/journal backup /tmp/
[1421186937:53197][11490:0x7f308da78740], wiredtiger_open: /data/db/copied_path2/journal/WiredTiger: No such file or directory
lt-wt: No such file or directory



 Comments   
Comment by Ramon Fernandez Marina [ 27/May/16 ]

johny, it seems your dataset is corrupt, and mongod is not able to repair it. SERVER-19815 is open to improve this functionality, so feel free to watch that ticket and vote for it.

As Michael pointed out, for MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag, where your question will reach a larger audience. A question like yours involving more discussion would be best posted on the mongodb-user group. See also our Technical Support page for additional support resources.

Regards,
Ramón.

Comment by johny [ 27/May/16 ]

Thanks Michael... but I actually tried mongod --repair both on windows and linux mongo installation. During repair mongo crashes :
-------------------------
2016-05-26T16:49:18.436-0600 I STORAGE [initandlisten] repairDatabase test
2016-05-26T16:49:18.437-0600 I STORAGE [initandlisten] Repairing collection test.testPositions
2016-05-26T16:49:18.437-0600 I STORAGE [initandlisten] Verify failed on uri table:collection-4--8207586138070318465. Ru
nning a salvage operation.
2016-05-26T16:49:18.437-0600 I - [initandlisten] Invariant failure rs.get() src\mongo\db\catalog\database.cpp 190

2016-05-26T16:49:18.438-0600 I - [initandlisten]

***aborting after invariant() failure
----------------------------

Comment by Michael Cahill (Inactive) [ 27/May/16 ]

johny, the original issue reported here is specific to backups, so it is not relevant to the error you are getting.

A better forum for your question is the MongoDB user list https://groups.google.com/forum/#!forum/mongodb-user – my first question would be why not use mongod --repair, which will run a salvage on any collections that fail validation.

Comment by johny [ 26/May/16 ]

has this been ever resolved?
I have the same error when trying to recover the data:

root@vm:/home/wiredtiger-2.8.0# ./wt v -h ../mongo-bak/ -C "extensions=[./ext/compressors/snappy/.libs/libwiredtiger_snappy.so]" -R salvage collection-0-2418654698497411062.wt
lt-wt: No such file or directory

Generated at Thu Feb 08 03:42:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.