1

I'm attempting to move a synced user+realm between two Realm Object Servers (developer edition), moving the Realm file is relatively straight forward but moving the user seems a little less so. The docs are a little sparse on the purpose and structure of the files inside of the ROS' root directory.

What's the best way to approach this, if it's possible at all.


To be clear, in this situation there are two ROS (ROS1 and ROS2). I want to move a user, their auth information and their realms from ROS1 to ROS2 without losing information on ROS2.

1 Answers1

0

Assuming the platform is Linux(that only affects the folder path), it should be fine if you copy /var/lib/realm/object-server from one machine to the other. Don't forget to make sure the realm user can access the files,

sudo chgrp -R realm /var/lib/realm/object-server
sudo chmod -R g=rX /var/lib/realm/object-server

If you are moving files from macOS to Linux, you should first delete the files on the target machine, rm -rf /var/lib/realm/object-server. and then copy the contents of object-server/root_dir(on MacOS) to /var/lib/realm/object-server(on the target Linux system). Again, don't forget to make sure the realm user can access the files.

  • Yeah, this is the process of Backup + Restore mentioned in their documentation, but I want the target Realm Object Store to remain functional without data loss. I'll update the question to be more clear. – CodyJames.LeBlanc May 05 '17 at 13:33
  • We don't have a procedure for moving just one user. But assuming you want to move all users, the process above should enable that without any data loss. If that is not the case, would you please open an issue in https://github.com/realm/realm-mobile-platform? – Radu Tutueanu May 08 '17 at 12:42