Forums | MacLife

You are not logged in.

#1 2008-06-04 4:37 am

Light Speed
Doubter of Einstein
Registered: 2002-08-17
Posts: 3693

Rsync through SSH question

I am running a CentOS 5.1 remote box and want to back it up to my local Mac.

Is the best way to do this with rsync through SSH? If so how does that handle the live DBs on the box during the backup?

If my server needs a bare metal restore will I be able to do it remotely from my backups?

Last edited by Light Speed (2008-06-04 4:38 am)

Offline

 

#2 2008-06-05 3:49 am

Light Speed
Doubter of Einstein
Registered: 2002-08-17
Posts: 3693

Re: Rsync through SSH question

OK.

Guess this is the wrong place.

Offline

 

#3 2008-06-20 10:59 am

StrawHand
Member
From: Florida USA
Registered: 2000-08-17
Posts: 622
Website

Re: Rsync through SSH question

I would say duplicate the file structure somewhere on your Mac and then copy to it. I just went through this duping from one remote server to another. Here's an example of the syntax to copy the contents of the home/ (or any) directory from one server to another:

(the second home is the directory on your Mac... can be named anything you want actually)

rsync -avz -e ssh root@remote.ser.ver.ip:/home/ /home/ --exclude "directoryIdontwantcopied/" --exclude "anotherone/" --exclude "somefileIdontwant copied.*"

etc... you get the idea. you definitely DO NOT want to copy the MySQL-install directory. If you go to overwrite it from backup you will FUBAR your MySQL install. I probably wouldn't copy the OS either unless your provider will NOT do an OS reinstall. I found no problems copying dbs using method as well.

rsync -avz -e ssh root@remote.ser.ver.ip:/var/lib/mysql/ /var/lib/mysql/ --include "db_1" --include "db_2" --include "db_3" --exclude "*"

This second run only copies dbs I specify and excludes everything else (*)wildcard.

I hope this helps.

Last edited by StrawHand (2008-06-20 11:01 am)


Dirty Skies - Experiences in Urban Backyard Astronomy

Offline

 

#4 2008-06-20 2:02 pm

Light Speed
Doubter of Einstein
Registered: 2002-08-17
Posts: 3693

Re: Rsync through SSH question

Thanks StrawHand.

That helps and good tips!

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson