[BlueOnyx:08091] Re: CMU

Chuck Tetlow chuck at tetlow.net
Fri Aug 12 11:59:08 -05 2011


Then go to the command-line and dump the database to a file before turning it off for that site.  The command is simple:
mysqldump --opt --flush-logs databasename -u root -p > dumpfilename

Provide the MySQL database server root password and its done.  So you can always dump the databases before working with the sites, to be sure the data isn't lost.  In fact, it would be a good idea to dump every database on each server before starting any work.  That way, you can restore them if you accidentally push the wrong button.

Wait a second.  In re-reading your e-mail, I'm puzzled.  How could two sites show the same database name?  I assume that means you had a site on the new server that was already assigned "site3_db".  Then you cmuImported a new site that had been assigned that same name on another server.  Is that right?

That's why we don't use database names based on the site number assigned by the server.  We use database names that match the site name - so a database for the site www.cnn.com would also be named www.cnn.com.  That way - there is never a database name conflict.

In your case, here's how I would suggest you do it:
1) Backup the "site3_db" on the old server before cmuExporting the site.  Use the above dump command and send it to a filename.  
2) Before cmuExporting the site off the OLD server - TURN OFF MySQL database in the GUI.  While that may delete the database on the old box - you've got a dump of it to a file.
3) Copy that database dump file and the cmuExport to the new server.  
4) cmuImport the site on the new server.  
5) Turn ON database support for the newly imported site on the new server.  When you turn on MySQL for the new site - you can give it any database name you wish (like site17_db or www.domain.tld).  
6) Now simply import that database dump from the old server to the new database - and you're set!

This is why I don't like using the GUI for the MySQL, or for much else.  Do it from the command-line and you don't run into these problems!!  The only thing I really like the GUI for is MailWatch.

I know, I know - not everyone is comfortable at the CL.

Chuck

---------- Original Message -----------
From: "Uwe Spreckelmeyer" <us at itss24.com> 
To: "'BlueOnyx General Mailing List'" <blueonyx at mail.blueonyx.it> 
Sent: Fri, 12 Aug 2011 18:16:14 +0200 
Subject: [BlueOnyx:08090] Re: CMU

> Hi Chuck,
>  
> the problem is a bitdifferent. When you use the GUI to manage your sites you will see that twosites will have the same DB. 
> For example: Old site3has site3_db and newly imported site3 from the other server, now site17 on thenew server also has site3_db.
>  
> When you disable Mysqlfor new site17, site3_db of site3 will be destroyed.
>  
> You don´t have a chanceto change the db_name within the GUI.
> Even if you give site17 anew database like site17_db, anyone else who may manage the server woulddestroy site3_db by mistake when disabling mysql for site17.
>  
> Uwe
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
> 
> 
-----------------------------------------------------------------------

> Von:blueonyx-bounces at mail.blueonyx.it [mailto:blueonyx-bounces at mail.blueonyx.it] Im Auftrag von Chuck Tetlow
> Gesendet: Freitag, 12. August 201117:24
> An: BlueOnyx General Mailing List
> Betreff: [BlueOnyx:08089] Re: CMU
>  
> >From my experience using cmuExport/cmuImport - it doesn't do athing for the MySQL databases.  I've always had to backup/restore thosemanually, outside the CMU process.  Admittedly, I haven't had to use CMUin the last 12 months or so.  But before that - I got a LOT of experiencewith CMU. 
> 
> So simply restore the database dump to a different database name on the newserver.  Dump the database on the old server to a file like"site3_db.dump".  Copy that to the new server and use somethinglike "cat site3_db.dump | mysql -u root -p newdatabasename".  Provide the root MySQL passwordand a name for that moved site's database - and you're all set.  No damageto the current site3's database. 
> 
> Chuck 
> 
> P.S. - You might have to create that new database before restoring the dump toit.  I don't remember.  But that's easily done.  Just create theempty database first - either at the command line or in phpMyAdmin. 
> 
> ----------Original Message ----------- 
> From: "Uwe Spreckelmeyer" <us at itss24.com> 
> To: "'BlueOnyx General Mailing List'" <blueonyx at blueonyx.it> 
> Sent: Fri, 12 Aug 2011 10:58:30 +0200 
> Subject: [BlueOnyx:08086]  CMU 
> 
> > When you cmu-export a site -i.e. site3 - and cmu - import it to another 
> > Server it will become i.e. site17. The sites database name is stillsite3_db 
> > on the new server even though this db is already in use by site3 of this 
> > server. 
> > 
> > What can be done to prevent destruction of site3_db on the new serverusing 
> > the GUI  (Websettings of site, MySQL user and database, enable/disable).
> > Is it possible to disable Mysql for a site without destroying the db bythe 
> > GUI? 
> > 
> > Any hint? 
> > 
> > Uwe Spreckelmeyer 
> > 
> > _______________________________________________ 
> > Blueonyx mailing list 
> > Blueonyx at mail.blueonyx.it 
> > http://mail.blueonyx.it/mailman/listinfo/blueonyx
> ------- End of Original Message -------
------- End of Original Message -------
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.blueonyx.it/pipermail/blueonyx/attachments/20110812/0d95891f/attachment.html>


More information about the Blueonyx mailing list