Mongodb backup using wiredtiger utility wt

38 views
Skip to first unread message

developer

unread,
Feb 21, 2024, 8:41:30 AMFeb 21
to wiredtiger-users
We have sharded replica mongodb database with wiredtiger as storage engine.
Mongodb tools like mongodump and mongorestore cannot be used to backup database (on sharded cluster) as we cannot  stop the writes on the database.

We understand we can utilize wiredtiger utility wt for backing up mongodb.

As per wiredtiger document,
WiredTiger backups are "on-line" or "hot" backups, and applications may continue to read and write the databases while a snapshot is taken.

We downloaded source code from git and built both wt and libwiredtiger.so . However backup is not working (WiredTiger database is already being managed by another process: Device or resource busy)indicating to stop mongod process. So how can I achieve hot backups using wiredtiger for mongodb database?

Thanks in advance

Will Korteland

unread,
Feb 21, 2024, 6:09:07 PMFeb 21
to wiredtig...@googlegroups.com
Hi d75695581,

The WiredTiger documentation is for applications using WiredTiger. In this case, the application using WiredTiger is MongoDB, and my understanding is that MongoDB does indeed use the on-line/hot backup functionality if you ask it to take a backup.

The "exclusive" behaviour is by design - so whenever MongoDB is running, other applications cannot open the database. If your backup tool were to open the WiredTiger database first and stay running, mongod would be unable to open the database.

I'd strongly suggest using MongoDB functionality to take a backup here - I don't know about mongodump and mongorestore since this mailing list is specific to WiredTiger, but I imagine you could get pointed in the right direction by a MongoDB-specific help resource, for example the community forums (https://www.mongodb.com/community/forums/).

Sorry if that's not the news you wanted, but hopefully it's still useful.

Regards,
 - Will

--
You received this message because you are subscribed to the Google Groups "wiredtiger-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wiredtiger-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wiredtiger-users/b9160eb8-3614-415b-a847-9247d2202921n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages