Hi Anton,
I feel your pain, as I also follow the pattern of filling content into
the database locally, and then deploy with that data later.
I use MySQL locally and on Dreamhost, and if you can live with that
(MySQL is quite easy to install and manage), you can do as I do, which
is not optimal or beautiful, but quite effective: Use mysqldump.
To export your local database, run this command from the root of your
application:
mysqldump -u root radiant_development > ./db/dump.sql
Then upload the file to Dreamhost, and import it (make sure the
database is created and empty):
mysql -u dh_mysql_user -pdh_mysql_pw radiant_production < ./db/dump.sql
If you have uploaded files using gallery, page_attachments or
something else locally, you must also upload these manually from
public to public.
/Casper
On 03/06/2008, at 13:45, Anton Aylward wrote:
Thank you for this, Casper.
I'm a Dreamhost customer and and this has cleaned up some 'failed to
start' problems I've been having.
Its also made deploying some examples I have on my laptop easier since
now I can just have Apache deal with them on an as-needed basis
instead
of having to do a "cd ~/Ruby/<application>; ./script/server &" each
time.
However there is one aspect of deploying on Dreamhost that I'd like to
ask the group here about, and that is getting the content of the
database out there.
My first deployment of Radiant on Dreamhost last year I had
developed on
my laptop using SQlite3. The laptop runs Linux, not Windows. I
used a
CSS file in the file system (lacking sophistication and
understanding of
Radiant at that time). I SFTP'd the files, including the database, to
the Dreamhost machine but the application wouldn't start. It couldn't
open the database. I don't know if this was a word-length, library or
version problem. The application content was small enough that I
could
create a new database on Dreamhost and paste the pages in.
Radiant is more sophisticated now. The sites I'm developing use
extensions such as attachments, galleries, and of course the brilliant
styles_n_scripts. Even before the site content is added there is a
lot
of the site structure in the database now. And before adding 'real'
content I find that I lay out the hierarchy/structure and few pieces
of
boilerplate like a 'site map', 'About', and content and feedback
pages.
So I have a very simple problem of how do I get this database that
I've
developed as a the template or basic site content out to Dreamhost?
Reality is that by the time I've worked a bit it is more than just a
template, not least of all because the actual CSS and actual logos and
and snippets that deal with names etc are in the database too, as well
as many place-holders. You know how it goes.
I've just spent a very futile week prior to deploying my new web
site on
Dreamhost trying to convert a Sqlite3 database to a MySQL database
on my
laptop. I tried this so that I could "debug" any problems ahead of
time.
There have been nothing but problems. I have had no success.
I started with the import/export extension. It doesn't work. At the
very least it only knows about some of the tables. I corresponded
with
Sean about the problem and tried his suggestions. Zilch.
I also searched the web. There are many articles about converting
Sqlite3 to MySQL. The ones on the MySQL site are plain wrong! Others
admit to things like differencing SQL syntax but their 'fixes' are
incomplete. Even after much hand editing of the Sqlite3 ".dump" file
MySQL kept erroring. Some problems I could not find any reason for
even
though the revised syntax was A-OK according to the MySQL
documentation.
Chris Dwan posted a tool that allowed copy from one DB to another.
http://blog.radixhound.com/2008/4/28/backing-up-radiant-cms-using-sqlite3
I'm going to try this today on my laptop. I'll report on how it goes.
However there is still the problem of getting the database running on
Dreamhost and getting content into it there.
The reason I'm writing about this at length is that I am very
surprised
that Rails doesn't have tools for all this as part of its baseline.
Rails2 has moved to Sqlite3 as its default, and that's fine for
development. But I get to wonder if there are going to be more
projects
that are like Radiant in that the database has a template and
structure
that is part of the application and needs to be 'portable' as well.
Rails really needs something that can do database export/import in a
comprehensive and complete manner.
Casper Fabricius said the following on 03/06/08 03:17 AM:
Hi Nate,
I recently updated the guide for deploying Radiant to Dreamhost,
another shared host:
http://wiki.radiantcms.org/How_To_Deploy_on_Dreamhost
I don't know Railsplayground, but assuming you have SSH access you
should be able to follow this guide, substituting the steps for
creating the website and a database with whatever you do at
Railsplayground. Also, my blog entry has examples of rolling two
popular extensions into the deployment package:
http://casperfabricius.com/blog/2008/05/24/radiant-cms-on-dreamhost-with-phusion-passenger/
--
Expecting life to treat your fairly because you are a good person is
like expecting an angry bull not to charge because you are a
vegetarian.
-- Shari R Barr
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant