You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

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 GSH script does not run all that quickly especially if there are a lot of changes.

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.

It will not export

  • 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

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

The end of the script will print a summary of changes that occurred:

Script complete: total objects: 6222, expected approx total: 6327, changes: 133, known errors (view output for full list): 36

 

Example script

 
  • No labels