Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Grouper can export a folder or the entire registry as a GSH script.   This is currently experimental, take a backup or verify in a test env first.  In order to run the script you need a Grouper v2.2.2+ patched env.  Note, the  

Performance on demo server (local mysql database)

  • Exporting 6000 records to GSH takes 26 seconds
  • The GSH script ran 6000 records

...

  • 3min 30sec with no changes

...

  • If there were 6000 changes (new registry) it took 5 minutes.

The script is idempotent (run it twice, its ok).  It will not delete what is there in general though it will delete attribute assignments on exported assignments.

...

  • audits
  • point in time data
  • daemon logs
  • change log entries
  • if you are importing and the objects already exist, it will not sync up the object ID uuid's.  In some cases will be use different uuid even if the object doesnt exist
  • membership fields are not imported (note, privileges are, but if you are using a membership list that is not "members" (not common), that will be skipped
  • if you export a folder, and some necessary objects do not exist in the target (e.g. attribute definitions), they will be reported as an error and skipped
  • note: international characters have been tested on the demo server and works there though your mileage may vary, be careful here (test it)external users it represents by subject ID, so if those dont match up (UUID), then it doesnt work.  This can be improved at a later time

Start an export

Code Block
grouperSession = GrouperSession.startRootSession();
scriptName = "c:/temp/script.gsh";
new File(scriptName).delete();
new edu.internet2.middleware.grouper.xml.export.XmlExportGshScript().assignStemName(":").assignFileNameToWriteTo(scriptName).exportGsh();

...