Copying users from one instance to another
I have created a new Zope instance and wish to copy all my users from an older instance. I tried exporting the acl_users folder but cannot reimport it on top of the existing acl_users in the new instance. Can I get away with deleting the acl_users folder in the new instance long enough to import the old exported acl_users? -- James Garrison Athens Group, Inc. mailto:jhg@athensgroup.com 5608 Parkcrest Dr http://www.athensgroup.com Austin, TX 78731 PGP: RSA=0x04B73B7F DH/DSS=0x70738D88 (512) 345-0600 x150
james, try the following with your export file:: - log into the management interface of your new instance as the superuser/ inituser - delete acl_users - try importing the export file again that should work. trying to do it as a manager user that is defined in the acl_users you are deleting will not work. jens On Thursday, September 27, 2001, at 02:32 , James Garrison wrote:
I have created a new Zope instance and wish to copy all my users from an older instance. I tried exporting the acl_users folder but cannot reimport it on top of the existing acl_users in the new instance. Can I get away with deleting the acl_users folder in the new instance long enough to import the old exported acl_users?
-- James Garrison Athens Group, Inc. mailto:jhg@athensgroup.com 5608 Parkcrest Dr http://www.athensgroup.com Austin, TX 78731 PGP: RSA=0x04B73B7F DH/DSS=0x70738D88 (512) 345-0600 x150
I'll give this a try. However, it sounds like this will completely replace the target instance's user list. What if I want to take a set of users from instance A and ADD then to instance B. Is there any way to copy users to an existing acl_users folder? Jens Vagelpohl wrote:
james,
try the following with your export file::
- log into the management interface of your new instance as the superuser/ inituser - delete acl_users - try importing the export file again
-- James Garrison Athens Group, Inc. mailto:jhg@athensgroup.com 5608 Parkcrest Dr http://www.athensgroup.com Austin, TX 78731 PGP: RSA=0x04B73B7F DH/DSS=0x70738D88 (512) 345-0600 x150
there is no way to achieve this unless you write python code to do that programmatically. jens On Friday, September 28, 2001, at 10:57 , James Garrison wrote:
I'll give this a try. However, it sounds like this will completely replace the target instance's user list. What if I want to take a set of users from instance A and ADD then to instance B. Is there any way to copy users to an existing acl_users folder?
Jens Vagelpohl wrote:
james,
try the following with your export file::
- log into the management interface of your new instance as the superuser/ inituser - delete acl_users - try importing the export file again
-- James Garrison Athens Group, Inc. mailto:jhg@athensgroup.com 5608 Parkcrest Dr http://www.athensgroup.com Austin, TX 78731 PGP: RSA=0x04B73B7F DH/DSS=0x70738D88 (512) 345-0600 x150
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Would this work to copy user definitions from instance A to B? 1) Export acl_users from A and B to XML files 2) Copy user definitions from A's exported file into B's exported file 3) Delete acl_users from B and re-import from the updated XML file. Would the import know enough to adjust object IDs as needed? (Is that even a meaningful question? :-) Jens Vagelpohl wrote:
there is no way to achieve this unless you write python code to do that programmatically.
jens
On Friday, September 28, 2001, at 10:57 , James Garrison wrote:
I'll give this a try. However, it sounds like this will completely replace the target instance's user list. What if I want to take a set of users from instance A and ADD then to instance B. Is there any way to copy users to an existing acl_users folder?
-- James Garrison Athens Group, Inc. mailto:jhg@athensgroup.com 5608 Parkcrest Dr http://www.athensgroup.com Austin, TX 78731 PGP: RSA=0x04B73B7F DH/DSS=0x70738D88 (512) 345-0600 x150
that sounds like a horrible workaround. what i would do is the following: - export the old user folder - import it *into a subfolder* of the new site so it doesn't collide with the new site's user folder - write an external method that manually copies the contents of the old site's user folder into the new user folder. this could look like... (untested) OLD_UF_PATH = '/path/to/old/acl_users' NEW_UF_PATH = /acl_users' def migrateUsers( self ): old_uf = self.unrestrictedTraverse( OLD_UF_PATH ) new_uf = self.unrestrictedTraverse( NEW_UF_PATH ) old_uf_data = old_uf.data for key, value in old_uf_data.items(): new_uf.data[key] = value return 'Done' jens On Friday, September 28, 2001, at 11:23 , James Garrison wrote:
Would this work to copy user definitions from instance A to B?
1) Export acl_users from A and B to XML files 2) Copy user definitions from A's exported file into B's exported file 3) Delete acl_users from B and re-import from the updated XML file.
Would the import know enough to adjust object IDs as needed? (Is that even a meaningful question? :-)
Jens Vagelpohl wrote:
there is no way to achieve this unless you write python code to do that programmatically.
jens
On Friday, September 28, 2001, at 10:57 , James Garrison wrote:
I'll give this a try. However, it sounds like this will completely replace the target instance's user list. What if I want to take a set of users from instance A and ADD then to instance B. Is there any way to copy users to an existing acl_users folder?
-- James Garrison Athens Group, Inc. mailto:jhg@athensgroup.com 5608 Parkcrest Dr http://www.athensgroup.com Austin, TX 78731 PGP: RSA=0x04B73B7F DH/DSS=0x70738D88 (512) 345-0600 x150
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
James Garrison -
Jens Vagelpohl