I'm trying to use this module to create an installation profile for my site. Since I've never written an installation profile this module is probably my only option.
I also watched the screencast at drupal.psu and it was very helpful. I would however like to know about site content. All installation profiles I've used in the past have come with a site.sql file where it contains the database. It doesn't appear like this module copies the database and/or content of a site and just the settings(?)
I could dig into an installation profile and look at how to call the profile to install the DB from a site.sql file but if this functionality is built into this module it will make things a little easier for me.
Sorry for being a noob but we all have to make an installation profile the first time some time. Thanks for your help and thanks for the module.
Comments
Comment #1
RKS commentedI just extracted the function from another installation profile to call the sql so I don't really need this module to that for me anymore. It just would have been easier if it could.
I know logically it wouldn't create a backup of the database since there are already modules to do that, but including the php might be helpful for someone and just telling them to put their backup in the folder and change the name of the .sql or .mysql whatever in the php snippet. Just a thought. Probably beyond the scope of this module though.
Comment #2
btopro commentedSeedling sounds more like what you're talking about with doing a DB dump. If you want to include nodes and bring them along I'd suggest making a feature using Features and UUID (and http://drupal.org/project/uuid_features )
Comment #3
markwk commentedThere is a way to add nodes with Profiler but not really very easy. Uuid_features can work but tends to be a bit buggy.
This kind of a issue about content migration / deployment / installation / etc. is a fairly deep issue that I don't feel like Drupal has got a good solution on the table, yet.
Comment #4
RKS commentedAll I did was copy the dB like database.mysql and then used the predefined Drupal function to call tat file during installation. It's actually pretty easy and takes a few steps. However, that takes steps on the user's end and I know your focus is on making it as simple as possible for users to install these modules and it does all the work for them.
For my own personally case, this was a pretty straight forward process. Thanks for all the input.
Comment #5
prezaeis commentedwould you be so kind to help me do the same thing? i want to copy my drupal directory and do a database dump and have that in the installation profile, please im desperate
Comment #6
RKS commentedAll I did was use the Backup & Migrate module to copy the database. Then I just used the standard Drupal function in profile to reference it. I can post more thoroughly tomorrow but if you can't wait I'd suggest installing the Backup module and searching the Drupal docs for installation profiles.
Comment #7
RKS commentedhttp://drupal.org/project/backup_migrate
Comment #8
markwk commentedThis approach is not considered a good practice in the Drupal community. @btopro has a D6 module that does exactly what you are looking for drupal.org/project/seedling. Though no D7 version.
Depending on your skill set, you can export the content using node_export, then fairly easily reimport either manually or a simple hook during the installation.
Comment #9
RKS commentedWhy is this not a good practice in the Drupal community? You make a backup, which is good enough to use to reset your site if need be, and then you use the core Drupal hook to include it during installation. I've seen it work this way plenty of times. I'm not wanting to argue but it seems that Drupal has given you this hook right out of the box to use in just this manner. There isn't even another purpose for it and Drupal even provides documentation on how to use it. You actually don't even need a contributed module if you know how to backup your database directly from MySQL so I really can't see a problem with this method.
Comment #10
btopro commentedI wrote seedling knowing it isn't a best practice. It's considered a non-bp because you are creating a sql dump specific to the db environment you were using. This could have conflicts if someone running pgsql tried to use your mysql generated profile. For personal usage though seedling is a fast way of getting things working. Seedling is an add-on to back up and migrate plus some minor code to load it up in the install profile.
Should be pretty easy to port if anyone is interested; as I build full profiles now I have no use for it but it's a unique solution.
Comment #11
markwk commentedThere was a whole lively discussion awhile back when Lullabot did this "distro with db dump" practice. I don't have the reference at hand, but I recall the logic being around security, i.e. db pass security info in the open and people might fail to change passwords for example (and to a certain extent the inelegance of such a practice).
I guess obviously it depends on your situation. For an internal situation, a passed db will work. For someone looking to create a real drupal distro / installation profile, I wouldn't really trust someone using this approach.
Comment #12
btopro commentedarticle for reference -- http://www.lullabot.com/articles/5-step-drupal-distributions
Thanks for the vote of confidence mark ;)
I agree with that assessment though; internal usage / proof of concept to show someone else, perfect. Outside of that, potential security issue / in poor taste.
Comment #13
markwk commentedsarcasm?
In my case, the irony is that I don't really use profiler_builder anymore for building installation profiles with profiler library. I actually never did use it! It seems to do some funky things here and there. The module is a nifty little time saver for pulling out the site dependencies and a make file though :)
This issue about content migration and installation is a tough nut to crack. @btopro: I'm still waiting for you to build the skynet
Comment #14
btopro commentedIf you look at the latest install profile in elms you'll see I use a technique similar to profiler builder but not it straight up, just for the dependency lists. Profiler's main issue is that it deep scans that ALL dependencies are there (which is overkill) hence profiles take A LONG TIME to process (in big installs like ours).
As for migration, this is my current solution
Feeds + http://drupal.org/project/feeds_ridmap = user migration w/ role even into groups
Feeds + http://drupal.org/project/feeds_node_helper + UUID = Content migration, also into groups if needed
ELMS bundles both of these up, content into elms_content_import and users into something that hasn't been released yet
For export, Views + Views Bonus pack which is bundled into a feature called elms_content_export
This gives us 1 click export and 1 click import as everything is kicked out to xml and relationally mapped via UUIDs. This is for portability, not retroactive updating / diff'ing of nodes into each other (at least not yet).
Comment #15
markwk commentedInteresting stuff. UUID still runs into a bunch of issues with Drupal 7, especially around entities. I had a buggy upgrade last due to issues there.
Comment #16
btopro commentedThread has been cold for awhile, I'll accept patches for this functionality as it's kind of an edge case of building an install profile / distribution.
Comment #17
btopro commentedGoing to create a lazy-load style plugin directory for the way that the info file is built out. This will allow for a definition of dependencies.inc which will have the hooks necessary to define that it's the first part of the file. It will then lazy load other .inc files in the info_plugins directory. If someone would write a way of assembling the content for export then it'll be in content.inc and be able to be included. This will make it a lot easier to add this functionality but I still won't be adding it in directly at this time.
Comment #18
btopro commentedAPI flexibility to add this functionality has been added to dev. This capability (exporting content) is not currently in this project but the API required to add that functionality in (basically just writing part of the file) is now in. I imagine content will be VERY specific to the site you are exporting from, plus is usually a no-no generally when spinning up a distribution / install profile.
Comment #19
btopro commentedHave you looked into http://drupal.org/project/defaultcontent . I need to check it out but this seems extremely interesting and will be VERY easy to migrate an entire site's content via the Features 2.x version's "select all" capability.
Comment #20
btopro commentedsuggestion is to use another module to accomplish this though patches would be accepted to get this in given there are enough hooks for it to be possible.
Comment #21
joncjordan commentedDoes the method in this article work with Drupal 7? http://www.lullabot.com/articles/5-step-drupal-distributions
Comment #22
btopro commentedI don't believe so though you could do something similar I guess. That is not the recommended method that's for sure.