Re: [Zope] How to move acl_users from a Zope 2.7.8 server to Zope 2.10.7 ?
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
Aleksey Tsalolikhin wrote:
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?
Why don't you just copy the whole Data.fs and start it on the new server? Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
On Sun, Jun 7, 2009 at 10:25 AM, Chris Withers<chris@simplistix.co.uk> wrote:
Aleksey Tsalolikhin wrote:
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?
Why don't you just copy the whole Data.fs and start it on the new server?
Chris
Thanks, Chris. Is it safe to copy Data.fs from Zope 2.7.8 to 2.10.7? The internal format of Data.fs has not changed? Or are you suggesting I try it and see if it works? Thanks, Aleksey
On 11.06.09 01:05, Aleksey Tsalolikhin wrote:
On Sun, Jun 7, 2009 at 10:25 AM, Chris Withers<chris@simplistix.co.uk> wrote:
Aleksey Tsalolikhin wrote:
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?
Why don't you just copy the whole Data.fs and start it on the new server?
Chris
Thanks, Chris. Is it safe to copy Data.fs from Zope 2.7.8 to 2.10.7? The internal format of Data.fs has not changed?
Or are you suggesting I try it and see if it works?
You don't need our blessing for trying it out yourself *wink* :-) -aj
Aleksey Tsalolikhin wrote:
How do I migrate the users in acl_users from the Zope 2.7.8 server to the 2.10.7 one? Why don't you just copy the whole Data.fs and start it on the new server?
Thanks, Chris. Is it safe to copy Data.fs from Zope 2.7.8 to 2.10.7?
Yes, but since it'll be a *copy*, you can test whether anything gets trashed before you have to commit to it.
The internal format of Data.fs has not changed?
Newer versions of ZODB have always read older Data.fs files.
Or are you suggesting I try it and see if it works?
Yes, for your application, but I know it works for ZODB having taken storages, over time, from Zope 2.4 all the way through to 2.12 ;-) Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
On Fri, Jun 12, 2009 at 7:09 AM, Chris Withers<chris@simplistix.co.uk> wrote:
The internal format of Data.fs has not changed?
Newer versions of ZODB have always read older Data.fs files.
...
I know it works for ZODB having taken storages, over time, from Zope 2.4 all the way through to 2.12 ;-)
Great! Exactly what I was looking for! Thanks, Chris!! Aleksey
participants (3)
-
Aleksey Tsalolikhin -
Andreas Jung -
Chris Withers