• Support
  • Help! Data migration and merging.

Help! I previously built a website using Flarum, but due to financial issues, our server was shut down. I saved the database (MySQL) and then created a temporary site on FreeFlarum to start over(Mariadb). Now, we are preparing to redeploy our own server and want to merge and migrate the data from both the old and new sites. However, we have noticed differences in the database structures. What solutions are available to resolve this issue?

    BuMing119 this wont be as simple as you assume. Both dumps will start counting upwards from one for every data table (users, discussions, posts). In order to ensure posts and discussions remain linked to each other and the right users, you will need to manually change one of the dumps to start where the other data dump ended.

    In other words, you will need help from a developer.

      luceos Yes, this is also why we need to ensure that the two databases have the same structure. It seems that different versions of Flarum have different database structures. If I can make the structures of both databases identical, the migration will be a bit easier.

        BuMing119 It seems that different versions of Flarum have different database structures.

        The data structure for Flarum hasn't changed that much at all, to be honest. There have been 6 changes in the last year.

        Also, upgrading both dumps to the same version is trivial. Import both into separate, fresh new installs, upgrade and then dump. The problematic part remains the differences in auto increment values.

          luceos Thanks! Lastly, I would like to know how Flarum handles multiple accounts using the same email address. On FreeFlarum, some users from the old server have re-registered new accounts with the same email (fortunately, there aren't many of them). What will happen if the database data is merged?

            BuMing119 without modifications the merge wont succeed. You can use subadressing or attempt to merge both accounts, but this would require a script.