Code Monkey home page Code Monkey logo

rdmo-merge's Introduction

rdmo-merge

This script can be used to merge the content of two RDMO instances. More precice, It allows the ingest of a secondary RDMO instance into a primary instance, while keeping all foreign key relations intact and adding content elements which do not exist in the primary instance, yet.

Setup

The merge.py scripts needs Python3 without additional packages. It works on fixtures created from the instances. Both instance need to be updated to the latest version of RDMO. In particular, all database migrations need to be performed.

Usage

  1. Please create additonal backups of all relevant data, this is a rather complicated process. Things can go wrong.

  2. Create fixture dumps for both instances. Remember the instances need to be fully upgraded to the latest version. The following commands need to be executed in the rdmo-app directory of the primary and secondary instance.

    (env) ~/rdmo-primary$ ./manage.py dumpdata > primary.json
    (env) ~/rdmo-secondary$ ./manage.py dumpdata > secondary.json
  3. Run merge.py with the two dumps:

    (env) ~/rdmo-merge$ ./merge.py primary.json secondary.json output.json

    Warnings are created when an element of secodary is found in primary, but has a different value. This can happen if the element was changed whithout changing the URI.

  4. Load the created fixture into the primary instance:

    (env) ~/rdmo-primary$ ./manage.py loaddata output.json

rdmo-merge's People

Contributors

jochenklar avatar

Stargazers

Max Schröder avatar

Watchers

James Cloos avatar  avatar Olaf Michaelis avatar Harry Enke avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.