Could someone check my logic here? Just want to make sure before I waste my time with it.
First, the situation:
I launched a beta site, and had about 50 of my friends register to help me test it. Now that I have a better idea of where I'm going with it and what modules I want to use (for instance, Category and OG, which despite rumors to the contrary, are playing together rather nicely), I have a lot of leftover legacy junk, and it would be easier for me to simply start over with a fresh installation and database, but I don't want to make everyone register again. I'm using phpmyadmin to administer mySQL databases, and have done backups, restores, and minor data manipulation using it.
The Question:
In order to switch to a fresh, unmolested database and keep all my existing users in their current roles, it looks like all I should have to do is make a copy of my database, delete all the tables except for users and user_roles, then in the 'operations' screen in 'Copy database to', select 'Data Only' and copy away.
Is there a flaw in my logic?
Comments
I didn't checked the
I didn't checked the database scheme now but you must also set the current value for users_uid in "sequences" table. If you want to restore your nodes or something else then you should also insert the sequence number in the same table. Otherwise Drupal gets confused.
--------------------------------------------------------------
<signature owner="erdemkose">
<content>http://www.students.itu.edu.tr/~koseer/drupal/</content>
<description>This site is working with text files. Thanks to PHP-TXT-DB. You may download a copy of php-txt-db database layer for Drupal. There are bugs, incompatibilities but it is a good experiment.</description>
</signature>
Thanks, man. I'll try that.
Thanks, man. I'll try that. You've likely saved me hours of scratching my head and trying to figure out what I did wrong.
:-)
Rob Hamm
http://www.bookmuncher.com
What's the best way to move all my content?
I'm thinking of trying to get a fresh start on a drupal 4.7 install, and wondered if ther was an easy way to transfer all my content.... ie posts, comments, trackbacks etc to the new install?
I've done all the backing up and set up a dummy 4.7 site thats looking fresh and ready to go.... What's my next steps?
Thanks,
Mike Thomas
I've been playing with this
I've been playing with this since I posted here. If you're using PHPMySQL I can tell you how I do it.
Basically, make your new site (with your new database) and install whatever modules you want. Then select the old database in phpMySQL, go to the 'operations' tab and look for 'Copy database to.' Select 'Data Only,' make sure 'create database before copying' is UN-checked, type the new database name in the to field, and hit go.
Rob Hamm
http://www.bookmuncher.com
Which Tables?
Should I copy all the tables except the ones pertaining to modules not being installed?
For your backup of your old
For your backup of your old database, copy all of them. The purpose of the backup is to give you a fallback position in case something gets messed up.
For the new site: After creating your new site you'll want to empty all the tables you plan on transferring data to. Don't drop them--just empty them. This will keep you from having to deal with duplicate errors.
Take your old database (the one you made a backup of) and delete any tables you do not want to transfer data from. Then, as I said, you'll copy data only (no tables--just the data within the tables) to the new database.
Hope this clarifies. I'm sure there is a simpler way, but this is how I've been doing it.
:-)
Rob Hamm
http://www.bookmuncher.com
Moving 4.6 data with fresh install of 4.7
Thanks Rob,
I'll give it a go some time soon,
I'll let you know how it goes.
Mike