#8407 Migration of project data

unreleased
open
nobody
None
General
nobody
2022-01-05
2022-01-03
Vrinda A
No

I have two instances of Allura running and I want to merge both into one. To do this I would need to migrate the projects created on one instance into the other.
Is there a possibility to migrate project data of one Allura instance to another?

Discussion

  • Ingo - 2022-01-03

    Very good point. I was also confronted with this requirement of moving projects a few times.
    In my case it was always within one instance for now. But the requirement is similar.

    Maybe there can be a way to serve all requirements!?...

    • move between instances
    • move between neighborhoods
    • move from subproject (e.g. from the user profile) to a real one
     
  • Dave Brondsema

    Dave Brondsema - 2022-01-04

    For moving between instances, there is some closed-source scripts I have that backup, delete, and restore a project (optionally restoring with a new name). They have some parts I can't open-source immediately, but I can look into it. Conceptually they find all the models (mongo collections) that use the project_id and its app_config_id values. It dumps those as files. Then they can be restored back into the collection.

    One thing you can try exporting all your collections from mongo. Except users, neighborhoods, notifications, and things like that which are not project data related. Then load those all into another server. For the projects to join an existing neighborhood, you'll need to change the neighborhood_id on the imported projects. Other values like project_id and app_config_id should be totally unique and not cause any conflicts or problems. Obviously try the import on a test server first, and/or have really good backups you are confident you can restore from :)

    For moving between neighborhoods (and possibly sub-projects, not sure) there is a very obscure feature. I have no idea if it works well, or even at all. But you can try it and report back. Go to /p/_moderate/ (replace "p" with any neighborhood) and you can issue an invitation for a project to join that neighborhood. Then you can go to the project's admin area and there should be an Invitation link (url like /othernbhd/myproj/admin/invitations) and you can accept the invitation. Good luck! It might be made to work, if it doesn't currently work.

     
  • Vrinda A - 2022-01-05

    Thanks!.
    Finding all the models related to a project_id might need some time and effort to make sure nothing is missed out.
    Looking forward to your scripts to be open-sourced soon :)

     

Log in to post a comment.