Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] xmlExport: how to export groups without any uuid reference?

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] xmlExport: how to export groups without any uuid reference?


Chronological Thread 
  • From: Dominique Petitpierre <>
  • To: Chris Hyzer <>
  • Cc: "" <>
  • Subject: Re: [grouper-users] xmlExport: how to export groups without any uuid reference?
  • Date: Wed, 13 Mar 2013 02:42:28 +0100
  • Authentication-results: sfpop-ironport05.merit.edu; dkim=neutral (message not signed) header.i=none
  • Organization: University of Geneva

Hello,

Thanks for your replies:

On 03/12/2013 07:01 AM, Chris Hyzer wrote:
> The new-style export/import doesn’t export effective members:
>
> C:\mchyzer\grouper\v2_1\grouper\bin>gsh -xmlexport c:/temp/xmlexport.xml

> Does that work to go from dev to prod?

In our context the name of some stems and groups need to be changed
between test and prod, so do some grouperLoader attribute fields. In
most cases person members would need to be fixed after the copy
(grouperloader, usdu or "by hand").

> Note: uuid's will only be used on new objects...

- What defines a new object when importing? the path? the uuid? The
pair path+uuid?
- Any risk of uuid collisions between different instances of Grouper?

In other words
- is there a risk to corrupt the DB by importing an xml file containing
an unhappy (but locally correct) combination of elements?

For example if one were moving a hierarchy within the same instance of
Grouper, using gsh -xmlexport/-xmlimport in order to be able to edit
the xml file to change the root and do some branches reorganization
and renaming,
- would that work by changing just the names?
- would that work also in the case of branch replication (i.e. without
deletion of the original hierarchy)?
- what about the audit entries?

(I am reluctant to move groups with the UI or API: the old name is kept
which is then unusable).


> Is there a test env to try it on? :)

Currently there is.
I am encountering some import problems: see my next message.

Some minor problems:

1) When exporting a very small stem (test:t containing test:t:g1,
test:t:g2) the output xml file contains the two group objects but
even though the groups g1 and g2 have only one person member each, it
seems that all the person members of all the groups are included in the file
(<XmlExportMember>). Idem for the audit part: it seems all the audit
data is exported.
In this very small test case, that makes for a very big file that
takes a long time to produce (half an hour and needs to allow for a
large JVM heap):

grep -c '<XmlExportMember>' t1.xml
38699
grep -c '<XmlExportAuditEntry>' t1.xml
117516
wc t1.xml
1333542 6988058 530339023 t1.xml

- Is it possible to export just what is strictly needed when
specifying a few stems or objects?
If not,
- does xmlimport import all the XmlExportMember entries (subjects)?
- what does xmlimport do with all these audit entries about objects not
exported?


2) When exporting with the command

gsh.sh -xmlexport -includeComments -noprompt all.xml

very quickly there is an error with the message:

Caused by:
edu.internet2.middleware.grouper.exception.GroupNotFoundException: Cant
find group by uuid: aaa5fa5c8d414684b8874308c011cc09,

and the xml file contains just
----------
<?xml version="1.0" ?>
<grouperExport version="2.1.3" folderRoot=":" members="all">
<members>

<!-- group:
----------

It does not occur without the option "-includeComments", or when
specifying "-stems test:t".


Thanks in advance for your lights!
Dominique
--
Mr Dominique Petitpierre, user=Dominique.Petitpierre domain=unige.ch
IT Division, University of Geneva, Switzerland



Archive powered by MHonArc 2.6.16.

Top of Page