How to export or import user security settings

When you copy the Live database to a test environment, is there a way to keep the user security settings in test? Can I export the security settings from test, replace the database, then import the security settings? Are there other options for retaining separate security settings in a test environment?

I’m mostly concerned with retaining the security group memberships. I’m trying to avoid writing down this information and manually setting it again after replacing the database. Any idea how this can be done?

Thanks,
Carl

You could always export the data to CSV and DMT it back in.

Personally all of my clones from LIVE are scripted (i just python but any will do). Anything I need to repeat like:
Disabling report routing rules so emails not are sent
Disabling certain BPMs we dont want to fire
Changing the location of the Task Agent directory
Changing the names of the companies to include timestamp so we know how old data is
Change workstations to UAT QuickShip
Change ECM connection to UAT

I do pretty much the same list, but it is in the SQL restore script. I have a few users that I give different rights to in test that they do not have in live.

Thanks to both of you for your advice. I also have some users in test with access that they don’t have in live. I don’t have DMT, but maybe I can write SQL scripts to export and import these settings. I need to do more to automate the whole process of copying live to test.

Chris, are your python scripts calling REST methods to change the routing rules, disable BPMs, etc.?

We use Papercut on our test/dev servers… This allows us to keep the emailing in tact and you can test it without emails going out, just need to set the smtp server to 127.0.0.1

I ended up copying the user security groups for all active users in test to a table in a temporary database. I had to include the UserID and GroupList columns from the Ice.SysUserFile table in test. Then after we replaced the test database, I updated the security groups.

I used a similar method to save and reapply the default menu customizations.

If anyone wants to see the SQL scripts I used for this, let me know.

2 Likes

Apologies for posting on this old thread @cfredrickson but I couldn’t see how to contact you directly. I’m very interested in seeing those SQL scripts that you use for the security export/import.
Thanks,
Nick