On this page
MongoDB Realm stores data on the filesystem in auxiliary files. You can access these files through the Realm SDK. In some error situations detailed below, you might need to manually delete the auxiliary files. Otherwise, these are implementation details that you can safely ignore, presented here only for the curious.
Auxiliary File Types¶
MongoDB Realm's internal operation depends on several auxiliary file types:
- The realm file contains the data and metadata of the realm at the given Realm path. Each app can have several realms at different paths, each with their own realm file.
- The lock file enables synchronization between writes.
- The note file is a named pipe for inter-thread and inter-process notifications. While usually completely internal, the note file can cause the "unsupported resource found" error in iOS builds if you accidentally add it to the app bundle. If you see this error, delete the pipe.
- The management directory contains internal files for the realm's state management.
Manually Deleting Auxiliary Files¶
In some circumstances, you might need to delete the auxiliary files. You may delete auxiliary files when the realm is closed. Deleting any of a realm's files while the realm is open might corrupt the realm or disrupt Sync.
Client Reset Scenario¶
When using Realm Sync, a client reset is a serious error recovery task that your client app must perform in the following situation:
- The given synced realm on the server was restored from a backup. For example, due to a Realm server crash.
- The client app made changes to that realm since the backup was made, but did not sync those changes back to the server before the server was restored.
In other words, the client app must carry out a client reset on a given synced realm if the server is restored to a version older than the version on the client.
To perform a client reset, follow these steps:
- Create a backup of the local realm file.
- Delete the local realm file.
- The next time the app connects to the server and opens that realm, the app downloads a fresh copy of the realm file. The local changes made since the backup on the server are not reflected in the new file.
Realm Studio is a developer tool for desktop operating systems that allows you to manage Realm Database instances. With Realm Studio, you can open and edit local and synced realms. It supports Mac, Windows, and Linux.
See Releases on GitHub: