# Migrating from Realm Database Tips?

**URL:** <https://forums.swift.org/t/migrating-from-realm-database-tips/65321>\
**Category:** GRDB\
**Tags:** realm, migration\
**Created:** [June 2, 2023, 4:45am UTC](https://forums.swift.org/t/migrating-from-realm-database-tips/65321 "2023-06-02T04:45:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrekandore](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/andrekandore/32/2292_2.png) [@andrekandore](https://forums.swift.org/u/andrekandore)\
**Post date:** [June 2, 2023, 4:45am UTC](https://forums.swift.org/t/migrating-from-realm-database-tips/65321/1 "2023-06-02T04:45:34Z")

</div>

(if this is off-topic for this forum let me please apologize beforehand)

just wondering if there are any best ways to migrate away from realm to grdb without the realm library?

currently looking to migrate to a lighter weight solution (realm is currently overkill for my usecase) and would like to migrate away to grdb, but without having to leave realm as a dependency ongoing for another year or more...

just wondering if anyone has some experience with this?

---

<div class="post-metadata">

**Author:** ![gwendal.roue](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/gwendal.roue/32/13992_2.png) [@gwendal.roue](https://forums.swift.org/u/gwendal.roue)\
**Post date:** [June 2, 2023, 5:03am UTC](https://forums.swift.org/t/migrating-from-realm-database-tips/65321/2 "2023-06-02T05:03:24Z")

</div>

Hello @andrekandore,

Are you able to read the content of a Realm database file without the Realm library? If not, you'll have to keep Realm as a dependency until your users have migrated.

You may reduce the time span by shipping versions of your app that are able to ask the user to upgrade. This would allow you to stage the transition, with "Realm-only", "Realm-to-GRDB", and eventually the "GRDB-only" version.

---

<div class="post-metadata">

**Author:** ![andrekandore](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/andrekandore/32/2292_2.png) [@andrekandore](https://forums.swift.org/u/andrekandore)\
**Post date:** [June 2, 2023, 11:57am UTC](https://forums.swift.org/t/migrating-from-realm-database-tips/65321/3 "2023-06-02T11:57:20Z")

</div>

thanks for he quick reply!

i haven't looked into the actual binary format of the realm db so i cant say much, i was hoping there might be some lightweight tools to import without realm, but i think its as you say, we'd need to give users s brief but reasonable window w/announcement to upgrade to preserve data.

fortunately its mostly caches, so not too critical (though unfortunate inconvenience) i think

---

<div class="post-metadata">

**Author:** ![mills](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/mills/32/36946_2.png) [@mills](https://forums.swift.org/u/mills)\
**Post date:** [August 19, 2024, 5:35am UTC](https://forums.swift.org/t/migrating-from-realm-database-tips/65321/4 "2024-08-19T05:35:51Z")

</div>

@andrekandore did you find lightweight tool for data migration from Realm data file without having Realm as dependency in your project?

---

<div class="post-metadata">

**Author:** ![andrekandore](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/andrekandore/32/2292_2.png) [@andrekandore](https://forums.swift.org/u/andrekandore)\
**Post date:** [September 1, 2024, 1:25am UTC](https://forums.swift.org/t/migrating-from-realm-database-tips/65321/5 "2024-09-01T01:25:28Z")

</div>

nope
