Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File & Database transfer problems

Status
Not open for further replies.

albyh

Technical User
May 10, 2003
32
GB
Hi,

I have just signed up for a new server and am having a few problems transferring my files and database accross.

Database

I used the following command

mysqldump -u tdba -p --opt townsend > backup.sql
( i have also tried this without the --opt command)

I then transferred the file over to the new server and used the following command to import it

mysql -u root -p townsend < backup.sql

This is the error i am getting

ERROR 1064 at line 12: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc text NOT NULL,
PRIMARY KEY (ID),
FULLTEXT KEY image (


Files

I used the following command to tar/zip my directory

tar -czvf htdocs.tar htdocs

again transferred it over via ftp and tried to untar with

tar -xzvf htdocs.tar

All the files list but come up with Cannot open: No such file or directory on every file.

P.S. this file is approx 4GB.


Any help would be very gratefully recieved.

Thanks

Alban Horrocks
 
Alban, are you using binary mode for the ftp transfer? This is a requirement for tar files.
 
Also, check versions of MySQL between servers. You might be running a more current version than the new server, which can cause some import problems.

D.E.R. Management - IT Project Management Consulting
 
Thanks for your replys,

Not sure how can I find out if im in binary mode?

The MySQL versions are the same on both servers.
 
I recommend using mysqlhotcopy. Once it runs, it copies the tables to another directory. You can tar -cf, gzip (to make the ftp faster), and ftp them to the other machine. Copy them into the /var/lib/mysql/'database'/ directory, stop and restart mysql and you should be home free. That's how I always do it.

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top