Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Moving a textpattern site using rss_admin_db_manager -- problems
When Googling for advice on moving a txp site to a new host, the top hit currently is http://www.graphicpush.com/index.php?id=221 , which recommends using the rss_admin_db_manager plugin to accomplish the move. It seems to be by far the simplest method out there. I could not get it to work though.
On the old server, which was still live, I installed the rss_admin_db_manager in textpattern and got it working, once permission problems were ironed out. I never could complete a backup of the old database using rss_admin_db_manager though — and permissions problems don’t seem to be the root of it. Here’s the error:
Warning: unlink(/directory/httpdocs/files/1202764228-fpcogpub.sql.gz) [function.unlink]: No such file or directory in /directory/httpdocs/textpattern/lib/txplib_misc.php(512) : eval()’d code on line 95
I got around this by turning on debug in rss_admin_db_manager and issuing the echoed mysqldump command by hand from a shell on the new server. As far as I can see the dump is good and contains the appropriate content. I moved the dump to the new machine in the appropriate place.
But restoring it on the new machine using rss_admin_db_manager does nothing. rss_admin_db_manager silently returns (with no delay) and the database is, seemingly, unchanged.
Any help or pointers gratefully appreciated.
Offline
Re: Moving a textpattern site using rss_admin_db_manager -- problems
If you backed up from shell, why don’t you restore from shell? It’s faster and easier :). Did you modify the plugin for 4.0.6?
Offline
Re: Moving a textpattern site using rss_admin_db_manager -- problems
> I you backed up from shell, why don’t you restore from shell? It’s faster and easier :).
doak that actually worked. Thanks! Any clue why executing via the plugin fails? Just for academic and future historical interest.
> Did you modify the plugin for 4.0.6?
If you mean adding 3 lines per http://forum.textpattern.com/viewtopic.php?id=25795 , yes.
Offline
Re: Moving a textpattern site using rss_admin_db_manager -- problems
i’ve personally always had issues with rss_admin_db_manager as well (while others have no issues with it). i have no idea why since the error messages returned by the plugin aren’t really human readable. i always get “ERROR:2” whatever the hell that means. i don’t like that it seems to be host dependent, whereas the backup feature built into expression engine works flawlessly on the same servers i’m trying rss_admin_db_manager on.
Last edited by iblastoff (2008-02-12 04:59:56)
Offline
#5 2008-02-13 09:14:18
- Josefin
- Member
- Registered: 2008-01-30
- Posts: 18
Re: Moving a textpattern site using rss_admin_db_manager -- problems
I am about to move my textpatternsite from one webhost to another as well. I’ve never done that before, and I am not that skilled in handling databases.
How do I do that from shell?
> I you backed up from shell, why don’t you restore from shell? It’s faster and easier :).
Mac user…
Offline
Re: Moving a textpattern site using rss_admin_db_manager -- problems
Is there a chance anyone can share how to back up and restore using shell?
I think that this should also be included in the txpbook
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Moving a textpattern site using rss_admin_db_manager -- problems
colak wrote:
Is there a chance anyone can share how to back up and restore using shell?
Well, here is an answer, by no means an expert one.
Note: these commands are all done directly from the shell; you should NOT be logged in to mysql.
For backing up or preparing to move a TXP site, the basic command is:
mysqldump my_db_name > backup_file_name.sql
As written this will of course put backup_file_name.sql in the working directory; you can add a pathname to put it somewhere else.
In most situations you will need to add the options to specify user, password, and hostname. On my Dreamhost sites, it looks something like this:
mysqldump -umy_username -p -hmy_db_hostname my_db_name > backup_file_name.sql
where my_username
and the password you enter at the prompt are your mysql username and password, not your shell access username and password.
On localhost, as I have it set up, I can dispense with the hostname option.
If you are moving hosts or doing a safety backup, then you will want to dump the entire database, as above. If you are synchronizing a local version with a live version, you may want to skip certain tables, such as preferences, users, and log:
mysqldump -umy_username -p -hmy_db_hostname my_db_name --ignore-table=my_db_name.txp_prefs
--ignore-table=my_db_name.txp_users --ignore-table=my_db_name.txp_log > backup_file_name.sql
(the command above is all on one line)
Or you may prefer to dump only specific tables. If you have just made some page, form, and css changes on your local development version and want to upload them to the live site, list the tables after the db_name:
mysqldump -umy_username -p my_db_name txp_page txp_form txp_css > backup_file_name.sql
FTP the backup file you have just created to the host/directory where you want to use it. On the other end, when you want to upload:
mysql my_other_db_name < backup_file_name.sql
adding any necessary options for specifying the user, password, and hostname. Again, as written this assumes backup_file_name.sql is in the working directory.
Last edited by jsoo (2008-02-13 15:15:11)
Code is topiary
Offline
Re: Moving a textpattern site using rss_admin_db_manager -- problems
jsoo wrote:
FTP the backup file you have just created to the host/directory where you want to use it. On the other end, when you want to upload:
Just a sidenote – while you’re in an SSH session on your old host, you can drop the sql file at the new one –
#ftp, sftp, scp can be used
ftp new.example.com
put backup_file_name.sql
Also, for your backup file name, you could use:
mysqldump -u username -p dbname > `date +%Y-%m-%d`_backup.sql
which will produce 2008-02-13_backup.sql
. You can double check the backup with cat
or an editor nano
, vi
too: cat 2008-02-13_backup.sql
.
Offline