LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-10-2006, 10:53 PM   #1
cereal83
Member
 
Registered: Feb 2004
Location: Canada
Distribution: Slackware
Posts: 479

Rep: Reputation: 30
Synchronizing/Mirroring a Server


Hello all,

I was wondering how or if it is possible to synchronize/mirror a server. I use slackware 10.2 and just have been looking but can't find any information. If anybody could help me out, that would be great.

Basically what I would like to do is say about every 30 minutes to copy all the new files from server A to server B so they are the same and say if server A blew up and we switched the network cable to server B, everything would be find with no loss of data.

Thanks

Last edited by cereal83; 01-10-2006 at 10:55 PM. Reason: me have badder spelling
 
Old 01-10-2006, 11:11 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
I'm about to head off to a meeting so I'm being unoriginal and quoting myself... Does the following help?

http://www.linuxquestions.org/questi...21#post2033621
 
Old 01-10-2006, 11:31 PM   #3
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
To echo gilead, it sounds like a job for crontab plus rsync.

If you need to freeze all the files at a certain time point, then you could make logical volume snapshots before running rsync.
 
Old 01-11-2006, 08:51 AM   #4
cereal83
Member
 
Registered: Feb 2004
Location: Canada
Distribution: Slackware
Posts: 479

Original Poster
Rep: Reputation: 30
Hey and thanks for some reply's.

Rsync does sound like a good solution here and I am just wondering if there is another program. I am testing out rsync right now and do like it I am just wondering if there is something else for peice of mind.

Basically I have a web/sql server. I want to clone the server so incase the harddrives blow, we loose as little data as possible. If we like sync the important webpage and database files to another computer every 30 minutes or so then we loose little data and will be able to restore much quicker then restoring a backup of the day before since more data will be lost.

That freezing the files at a certain point and then transfering them seem like a really good solution too. I will look into the shortly after the rsync.


So I am checking into the rsync right now and will reply back if this is a bad solution for me or a good one.

Thanks

Last edited by cereal83; 01-11-2006 at 08:52 AM.
 
Old 01-11-2006, 10:07 AM   #5
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
Today, there really isn’t a good alternative to rsync, because of all of the built-in features. It’s even a good substitute for cp on the local system when you need to do some complex copying or backing up.


There’s lots of good info about rsync here: http://rsync.samba.org/

And lots of documentation here: http://rsync.samba.org/documentation.html


A good read through the rsync and rsyncd.conf (rsync server) man pages is worthwhile.

rsync man page: http://rsync.samba.org/ftp/rsync/rsync.html

rsyncd.conf man page: http://rsync.samba.org/ftp/rsync/rsyncd.conf.html


Specifically, look at how to set up a secure rsync server on your primary server.

It seems like I discover a new rsync feature every time I read the man pages.
 
Old 01-11-2006, 10:38 AM   #6
cereal83
Member
 
Registered: Feb 2004
Location: Canada
Distribution: Slackware
Posts: 479

Original Poster
Rep: Reputation: 30
Great

Thanks for all the info. I am reviewing all of it now. If I have any other questions I will be sure to reply back on here. After reading alot about it, it does seem like a great solution and it does have tons of features as you mentioned.

Thanks again
 
Old 01-11-2006, 12:50 PM   #7
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
I hadn't thought of using it on the local system - thanks WhatsHisName that helps me with something here
 
Old 01-11-2006, 02:52 PM   #8
cereal83
Member
 
Registered: Feb 2004
Location: Canada
Distribution: Slackware
Posts: 479

Original Poster
Rep: Reputation: 30
Well I was playing with rsync and it's good but I do have some problems. First, it's very slow. I can ftp a file from one computer to another and get 35 mb/sec and when I use rsync in the same exact case, it goes from like 3 mb/sec to 13 mb/sec and everywhere inbetween. Another thing is that it has a 2 GB file limit on files and thats no good since some files are much larger then 2 GB.

Is there another solution that I could look into?

Thanks
 
Old 01-11-2006, 03:48 PM   #9
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
You are correct in noting the apparent slow transfer rate, but it isn’t as big a deal as you might think.

The first time you do the transfer, the overall transfer will typically be slow compared to subsequent transfers. On subsequent synchronizations, rsync only transfers files that have changed, thus saving a lot of bandwidth, unless everything changes between synchronizations.

Even then, rsync doesn’t necessarily transfer the entire file to make the needed changes. So, one reason the transfer rate appears to be slow is because rsync is “thinking”.

Regarding the 2GB limit, I have read (but have never tried it) that making the transfer through an explicit ssh connection (-e ssh) overcomes the 2GB limit. Let me know if it works for you.
 
Old 01-11-2006, 06:05 PM   #10
cereal83
Member
 
Registered: Feb 2004
Location: Canada
Distribution: Slackware
Posts: 479

Original Poster
Rep: Reputation: 30
Hello and thanks again for a reply. I will try it again with the ssh enabled and see if that works. It is a very good little program and will report when I try it and see if it works
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Server mirroring ? rsync Bluesuperman Linux - Networking 3 04-25-2006 10:12 PM
Mirroring Fedora Directory Server (FC3,FC4) gyankosh Linux - Software 1 09-27-2005 10:20 AM
mirroring a whole server ginger.fish0 Fedora 3 08-22-2005 12:58 PM
Creating a test environment - server mirroring stillontheedge Debian 8 05-24-2004 04:05 PM
Mirroring bkeating Linux - Software 1 06-22-2003 06:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration