Splitting data.fs

classic Classic list List threaded Threaded
2 messages Options
llcolombo llcolombo
Reply | Threaded
Open this post in threaded view
|

Splitting data.fs

Hi all
I am approaching a configuration change for my current windows installation
of Plone (Plone 3.1.2, no buildout), mainly for backup purposes.
Currently my Plone instance holds 8 small sites, and my main purpose was
actually to run an automatic pack for the database once a week. I did that
moving the standard windows installation to a zeo one, and running
zeopack.py. That worked fine and made me happy, but then I though I could
actually also split my monolitic data.fs into a configuration where there's
a separate database for each site.
I do achieve the result, but only exporting each site from the original
data.fs in .zexp format and importing it in a newly created mount point,
while I would like not to have to export and import each site - I would feel
more confident in the whole procedure without having to do that.
As a first step, I started with isolating one of the sites, to be in a mount
point named sommelier. I defined in zeo.conf
<zeo>
  address 9999
  read-only false
  invalidation-queue-size 100
  # pid-filename $INSTANCE/var/ZEO.pid
  # monitor-address PORT
  # transaction-timeout SECONDS
</zeo>

<filestorage 1>
  path $INSTANCE/var/Data.fs
</filestorage>

<filestorage 2>
  path $INSTANCE/var/Sommelier.fs
</filestorage>

and, in zope.conf

<zodb_db main>
  mount-point /
  <zeoclient>
    server localhost:9999
    storage 1
    name zeostorage
    var $INSTANCE/var
  </zeoclient>
</zodb_db>

<zodb_db Sommelier>
  mount-point /Sommelier
  <zeoclient>
    server localhost:9999
    storage 2
    name Sommelier
    var $INSTANCE/var
  </zeoclient>
</zodb_db>

I copied the original data.fs in a new Sommelier.fs and restarted the
services. Then I added the new mount-point within the zmi. But the new mount
point, succesfully created, looks empty in the zmi...
If I don't clone the original data.fs and let the database be created from
scratch starting the services, I actually achieve the same result,
regardless what's the actual size of Sommelier.fs: the new mount point looks
empty. It is safe at this point to import an exported .zexp site in the
mount point, but is it possible to do what I was trying to do?
My idea was to clone the data.fs to th eSommelier one and then in the
Sommelier mount point just delete the other sites, ending up with a
Sommelier.fs only containing the sommelier site, which I would delete from
the original data.fs.
Is this achievable? I just trust less the export and import procedure...

thanks&bye
Lucia



------------------------------------------------------------------------------
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Jose Jose
Reply | Threaded
Open this post in threaded view
|

Splitting data.fs


I think this should work.

  1. Modify zope.conf to add the new data files.
  2. In the ZMI add the new Mount points
  3. From the root folder select a Plone Site.
  4. Do Not Use Cut/Paste, because Cut does not move the object (it creates a link to the same object I think), use Copy instead.
  5. Once you prove the copy is working
  6. Delete the originalPlone Site
I tried to use Cut/Paste and had problems when I deleted the original Plone Site, but everything worked fine with Copy/Paste.

Regards,
Jose


On Thu, Apr 2, 2009 at 3:55 PM, Lucia Colombo <[hidden email]> wrote:
Hi all
I am approaching a configuration change for my current windows installation
of Plone (Plone 3.1.2, no buildout), mainly for backup purposes.
Currently my Plone instance holds 8 small sites, and my main purpose was
actually to run an automatic pack for the database once a week. I did that
moving the standard windows installation to a zeo one, and running
zeopack.py. That worked fine and made me happy, but then I though I could
actually also split my monolitic data.fs into a configuration where there's
a separate database for each site.
I do achieve the result, but only exporting each site from the original
data.fs in .zexp format and importing it in a newly created mount point,
while I would like not to have to export and import each site - I would feel
more confident in the whole procedure without having to do that.
As a first step, I started with isolating one of the sites, to be in a mount
point named sommelier. I defined in zeo.conf
<zeo>
 address 9999
 read-only false
 invalidation-queue-size 100
 # pid-filename $INSTANCE/var/ZEO.pid
 # monitor-address PORT
 # transaction-timeout SECONDS
</zeo>

<filestorage 1>
 path $INSTANCE/var/Data.fs
</filestorage>

<filestorage 2>
 path $INSTANCE/var/Sommelier.fs
</filestorage>

and, in zope.conf

<zodb_db main>
 mount-point /
 <zeoclient>
   server localhost:9999
   storage 1
   name zeostorage
   var $INSTANCE/var
 </zeoclient>
</zodb_db>

<zodb_db Sommelier>
 mount-point /Sommelier
 <zeoclient>
   server localhost:9999
   storage 2
   name Sommelier
   var $INSTANCE/var
 </zeoclient>
</zodb_db>

I copied the original data.fs in a new Sommelier.fs and restarted the
services. Then I added the new mount-point within the zmi. But the new mount
point, succesfully created, looks empty in the zmi...
If I don't clone the original data.fs and let the database be created from
scratch starting the services, I actually achieve the same result,
regardless what's the actual size of Sommelier.fs: the new mount point looks
empty. It is safe at this point to import an exported .zexp site in the
mount point, but is it possible to do what I was trying to do?
My idea was to clone the data.fs to th eSommelier one and then in the
Sommelier mount point just delete the other sites, ending up with a
Sommelier.fs only containing the sommelier site, which I would delete from
the original data.fs.
Is this achievable? I just trust less the export and import procedure...

thanks&bye
Lucia



------------------------------------------------------------------------------
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users



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

_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users