By nazadus on
I'm wondering what it would take to migrate a Drupal installation to another machine.
The catch is, I don't want certain taxonomy terms (or their associated nodes).
The reason is we would like to use Drupal as our main knowledge base however on the computers we place at customers sites, we would like to be able to not include certain information.
Is there an easy way to do this, or am I going to have to write some code to do this?
/curious
Thank you for your time!
Comments
How about a script that deletes those nodes
I would mirgrate as is to the new machine using a data dump from the existing machine (use in place of the default database script). At that point the new machine will be a copy of the existing machine. Now use a script to prune out the nodes you no longer want.
There are far fewer taxonomy
There are far fewer taxonomy terms than nodes.
Since we have an ever-growing database, it would be more painful to delete ndoes everytime we migrate than it would be to delete whole tree's.
Although, I'm wondering how difficult it would be to throw in a 'secret' bit, which would allow you to keep a node as a secret (as far as a script is concerned) and delete it after the move.
hmm, it might be easier to make a module to extend the node system and to keep a binary list of nodes you want/don't want than it would be to write a script to have a list of checkboxes next to the list of terms for keeping or deletion.
What do you think?
-----------------
"Our greatest glory is not in never failing but in rising every time we fall." -- Confusious
Deleting nodes based on a taxonomy term
The following script (untested) should remove all nodes that use the specified taxoxonomy term ($tid in script).
Remember to set the $tid BEFORE running the script.
WOW, that's much
WOW, that's much appreciated!
Now all I have to write is the ability to recurse to terms that are associated with it.
-----------------
"Our greatest glory is not in never failing but in rising every time we fall." -- Confusious
I tried migrating my drupal
I tried migrating my drupal install to another machine, but it didn't really work out.
Current install: http://holieman.net/blog works fine
But when i moved al the files and imported the db to http://eendje.be/blog things seem to be going wrong.
I'm pretty sure I copied everything. Suggestions anyone?
How did you migrate it?
How did you migrate it?
Did you do a MySQL dump and re-import it?
-----------------
"Our greatest glory is not in never failing but in rising every time we fall." -- Confusious
Yes i did, but it didn't
Yes i did, but it didn't work.
I found no other solution than migrating the domainname i wanted the site to be on (eendje) to the server that was running the site correctly :D
hmmm
a mysqldump and then a restore to the new database, create and acocunt and password and give it appropriate rights. Copy the files over and edit the settings.php dburl and sitename as appropritae should work just fine. I have done a number of these types of moves to and from a variety of different systems.
-sp
---------
Drupal Best Practices Guide - My stuff Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Same situation as HoliemaN
I'm in the same situation as HoliemaN.
I've done as above and the content of the home page appears without theming. However every link on the page does not work.
What could I have missed or done wrongly?
Any advice is deeply appreciated.
You could try taxonomy_access module
You could try using the taxonomy_access module to restrict access so that nobody can access the certain taxonomies on the public computer.
The problem is my boss
The problem is my boss doesn't want that data on that computer, as it will belong to a customer.
We want something were we can give them partial documentation (as the other part is proprietary (sp?) and also becuase they don't need to know it (they aren't that smart and giving them too much information usually results in problems).
So, here is what we are left with:
We have a main knowledge installation, running Drupal.
We have a customer computer which we want to have parts of the knowledge base, becuase not every customer has the same type of product. We build custom robots.
MY boss is *very* paranoid of the internet becuase he doesn't understand it.
-----------------
"Our greatest glory is not in never failing but in rising every time we fall." -- Confusious
migrating to another pc by migarting the nodes only
well one of the things i tried and worked fine is to only migrate the content and setting the drupal site again, well it worked...
mysqldump -u user -p drupal node > node.mysqlmysql -u user -puse newdbnamedrop table node;exit mysql
mysql -u user -p newdbname < node.mysqland well it copied all the content....
which saved me 70% of the work, since setting it up is not that of a hassle that if you have the taxonomy archiitecture with you and the user roles...
WARNING: need to migrate more than just the nodes
If you migrate only the nodes you will run into problems when you add new content.
You also need to update the sequences table for the entry where the name field is 'node_nid'. You need to 'copy' the value of the id field from the old to the new database.
sorry forgot about that..
soory forgot about the id column, yes you actually have to copy the ids from the old database to the new ones, so you can be able to add nodes...
cheers,
b.