Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] Clean db from users without memberships

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] Clean db from users without memberships


Chronological Thread 
  • From: Chris Hyzer <>
  • To: Francesco Malvezzi <>, "" <>
  • Subject: RE: [grouper-users] Clean db from users without memberships
  • Date: Wed, 28 May 2014 13:54:16 +0000
  • Accept-language: en-US

You want to get rid of entries in grouper_members which arent used anywhere
else (there are a ton of foreign keys to this table)? I don't think we have
a utility to do that. I guess you could backup your data, and write a script
that tries to delete each record in that table in its own transaction and if
a record fails due to foreign key, then ignore. Or you could look at all the
foreign keys and write a delete script where the record is not used in any
foreign key (backup your data for this too obviously).

Im not sure I recommend doing either of these though, up to you :)

Thanks,
Chris

-----Original Message-----
From:


[mailto:]
On Behalf Of Francesco Malvezzi
Sent: Wednesday, May 28, 2014 9:35 AM
To:

Subject: [grouper-users] Clean db from users without memberships

Hi all,

In order to have a smaller file from the backup script:
$GROUPER_HOME/bin/gsh.sh -xmlexport $BACKUP/grouper-$DATE.xml -noprompt
> /dev/null
i would like to be able to delete from db users without any membership.

I believe I need a sql command, but I have no idea what to look for,

thank you,

Francesco



Archive powered by MHonArc 2.6.16.

Top of Page