Transfering from another VPS company to Linode

I already have a linode in London and would like to add another.

The question is what is the best way to do this in my situation.

At the other VPS (St Louis…) I have 10 or so low traffic sites built on LEMP Ubuntu Hardy 64bit.

I am thinking it is best to get a new Linode and build it from scratch with Lucid 32 bit LEMP (or LAMP maybe).

Then I would just copy over the "virtual hosts" and the "sites-available" files and make some fine adjustments maybe.

For the database can I simply transfer over /var/lib/mysql or will there be issues because I am going from Hardy 64 to Lucid 32?

And / or is there a better way to do this?

Thanks

8 Replies

If it's not too complex, it sounds to me that building from scratch and copying over the files is a good way to go.

As for MySQL, I think mysqldump is the way to go, then you can just import it in the new database.

thanks I thought if I did that I would have to do all the databases individually but them I discovered you could do all at once…

Is this correct:

> mysqldump –all-databases> backup.sql

mysql -u root -password < backup.sql

Thanks.

I think that is more or less the exact thing I do for backups, so yeah.

Yep that's fine but it maybe faster to do this

mysqldump –all-databases | gzip > backup.sql.gz

then transfer over ssh

and run gunzip backup.sql.gz | mysql -u root -p

That way it's compressed and SSH transfer time will be reduced

Great advice will try that - thanks all

@obs:

Yep that's fine but it maybe faster to do this

mysqldump –all-databases | gzip > backup.sql.gz

then transfer over ssh

and run gunzip backup.sql.gz | mysql -u root -p

That way it's compressed and SSH transfer time will be reduced

Pfft, skip the intermediate step, pipe it right through mysqldump/gzip/ssh/gunzip/mysql in a single command without ever hitting the disk :P

(Note, I'm joking, although you can do this)

lol - actually I saw this example

> mysqldump -u sadmin -p pass21 Customers | mysql –host=202.32.12.32 -C Customers

from ~~[http://www.devshed.com/c/a/MySQL/Backing-up-and-restoring-your-MySQL-Database/2/" target="_blank">](http://www.devshed.com/c/a/MySQL/Backin … atabase/2/">http://www.devshed.com/c/a/MySQL/Backing-up-and-restoring-your-MySQL-Database/2/](

which basically does what you say?

Except it does it by exposing the MySQL servers directly to the public Internet (or at least one of them), as opposed to doing it safely over SSH.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct