[Zope] How to move acl_users from a Zope 2.7.8 server to Zope 2.10.7 ?

Aleksey Tsalolikhin atsaloli.tech at gmail.com
Sat Jun 6 21:21:47 EDT 2009


Hi.  I am moving a Web application from a Zope 2.7.8 server to 2.10.7.

How do I migrate the users in acl_users from the Zope 2.7.8 server to
the 2.10.7 one?

Andreas Jung suggested exporting it from the old server and importing
in the new.

Apparently this worked (although I had to blow away the "acl_users"
folder on the
new server before I could import the "acl_users" folder from the old server; and
I had to use zpasswd.py to create "inituser" and "access" files in my Zope root
so that I could access the ZMI to import the acl_users folder.)

I have very little experience with Zope so I turn to you guys, is this
a totally insane
thing I did, or is it absolutely correct and I (and Andreas) should be
rewarded?  :)

I did try using the copy_users.py script but had no luck with it.  :(

The record of my attempt follows.

If somebody has experience with migrating acl_users from one server to
another, please write me!


http://www.zope.org/Products/CMF/docs/admin/andrew_PTK2CMF/view


http://www.zope.org/Members/ensane/PTK2CMF/copy_users.py

I put the copy_users.py file in /var/lib/zope/Extensions and added it
as an External Method

(fill out the form as copy_users, copy_users, copy_users and copyUsers)

then add a DTML Method as per the instructions

-------------------------------------------------------------------------------


I created a DTML Method called do_copyUsers:

<dtml-call "copy_users('acl_users', 'copy_of_acl_users')">


but when I ran it, I got:


Site Error

An error was encountered while publishing this resource.

Error Type: KeyError
Error Value: 'copy_of_acl_users'

Troubleshooting Suggestions

    * This resource may be trying to reference a nonexistent object or
variable 'copy_of_acl_users'.
    * The URL may be incorrect.
    * The parameters passed to this resource may be incorrect.
    * A resource that this resource relies on may be encountering an error.

For more detailed information about the error, please refer to the error log.

If the error persists please contact the site maintainer. Thank you
for your patience.




so I created an empty folder called copy_of_acl_users

and tried running my DTML method again ,but got:
ite Error

An error was encountered while publishing this resource.

Error Type: AttributeError
Error Value: _addUser

Troubleshooting Suggestions

    * The URL may be incorrect.
    * The parameters passed to this resource may be incorrect.
    * A resource that this resource relies on may be encountering an error.

For more detailed information about the error, please refer to the error log.

If the error persists please contact the site maintainer. Thank you
for your patience.


I also tried removing /copy_of_acl_users and recreating it again, but this
time I checked the "create user folder" box.

Tried running my DTML method again, but again got

Error Type: AttributeError
Error Value: _addUser

I also created a copy of the acl_users folder in /aleksey_temp/acl_users


Modified my DTML method to:

<dtml-call "copy_users('acl_users', 'aleksey_temp/acl_users')">

and when I ran it, Zope output a zero byte file called do_CopyUsers


Best,
Aleksey


More information about the Zope mailing list