Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri May 27, 2011 10:42 am 
Offline
Junior Member

Joined: Wed Apr 06, 2011 8:20 am
Posts: 29
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


Top
   
 Post subject:
PostPosted: Fri May 27, 2011 10:56 am 
Offline
Senior Newbie

Joined: Tue Dec 14, 2010 10:30 am
Posts: 16
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.


Top
   
 Post subject:
PostPosted: Fri May 27, 2011 11:27 am 
Offline
Junior Member

Joined: Wed Apr 06, 2011 8:20 am
Posts: 29
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:

Quote:
mysqldump --all-databases> backup.sql
mysql -u root -password < backup.sql


Thanks.


Top
   
 Post subject:
PostPosted: Fri May 27, 2011 11:35 am 
Offline
Senior Newbie

Joined: Tue Dec 14, 2010 10:30 am
Posts: 16
I think that is more or less the exact thing I do for backups, so yeah.


Top
   
 Post subject:
PostPosted: Fri May 27, 2011 12:00 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
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

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Fri May 27, 2011 12:07 pm 
Offline
Junior Member

Joined: Wed Apr 06, 2011 8:20 am
Posts: 29
Great advice will try that - thanks all


Top
   
 Post subject:
PostPosted: Fri May 27, 2011 1:39 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
obs wrote:
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)


Top
   
 Post subject:
PostPosted: Fri May 27, 2011 1:47 pm 
Offline
Junior Member

Joined: Wed Apr 06, 2011 8:20 am
Posts: 29
lol - actually I saw this example

Quote:
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/

which basically does what you say?


Top
   
 Post subject:
PostPosted: Fri May 27, 2011 10:01 pm 
Offline
Senior Member

Joined: Sat May 03, 2008 4:01 pm
Posts: 569
Website: http://www.mattnordhoff.com/
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.

_________________
Matt Nordhoff (aka Peng on IRC)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group