LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-03-2003, 08:19 PM   #1
jasoncngo
LQ Newbie
 
Registered: Mar 2003
Location: Melbourne, Australia
Distribution: Red Hat 8.0
Posts: 6

Rep: Reputation: 0
duplicating a webserver


Hi all,


I need help. Currently there are two linux boxes both with Apache installed on them.

One being a webserver hosting a site. the other being a proxy server running Squid.

I would like to duplicate the webserver site on the proxy machine.

I know the webserver is running components like MySql.

What I basically want is a clone of the site copied to the proxy server so I can edit the site and alter it.

The site is owned by the company I work for and its all legit.
I am just new to linux. I can use FTP ? But I know its more involved than just FTP.

I am aware there is some utility in MySql that can suck a database from another database.

My boss is expecting me to duplicate the website on one machine to another. Sounds easy, but its more involved than what he thinks.

Or is it easy ? Any suggestions may help me thanks.
 
Old 04-04-2003, 02:41 AM   #2
Yoss
LQ Newbie
 
Registered: Apr 2003
Posts: 17

Rep: Reputation: 0
Hi jasoncngo,

a good tool to clone some parts of a machine is rsync.

Do you have sshd installed on one machine? then you can use rsync with the following syntax:

rsync -rltgvHe ssh <user>@<source-ip>:<source-directory> <user>@<destination-ip>:<destination-directory> .

A bit complicate is to copy the programs like mysql and apache. it depends on the Linux distribution (installation with packages or selfcompiled) and how do you configured these programs.

Duplicate the database should be easy. Stop the mysqldemon. Copy the database and configuration file (sorry, i'don't know mysql and which files you must copy) to the new machine and start the mysqldemon on the new machine.


I hope, this helps you a bit ....


Regards
Yoss
 
Old 04-04-2003, 04:37 AM   #3
NSKL
Senior Member
 
Registered: Jan 2002
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207

Rep: Reputation: 46
I'm not sure but maybe you can use wget. Something like
wget -r www.mysite.com should duplicate the whole directory tree of mysite.com. However, i don't think it'll get the database, etc... but if you don't find a better solution, maybe it's worth a try. Also, man wget might help, there are many options.
HTH
-NSKL
 
Old 04-04-2003, 05:53 AM   #4
pablob
Member
 
Registered: Apr 2003
Location: Madrid
Distribution: RHEL, Kubuntu, Solaris, TRU64
Posts: 382

Rep: Reputation: 31
Apache:
you need to copy & modify according to the other server (IP, hostname,etc...)

- httpd.conf under apache_directory/conf
- htdocs (complete directory)

Mysql:

Install Mysql on the 2nd machine and use mysqldump to restore the data.
 
Old 04-04-2003, 01:22 PM   #5
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
I set up a similar system last week for doing just that. I used a method similar to Yoss (just different switches). If you have setup ssh authentication using dsa then rsync over ssh is easy to put in a cron job and can be run every hour etc.
 
Old 04-06-2003, 07:27 PM   #6
jasoncngo
LQ Newbie
 
Registered: Mar 2003
Location: Melbourne, Australia
Distribution: Red Hat 8.0
Posts: 6

Original Poster
Rep: Reputation: 0
thanks guys/gals

Thanks people I will try and let you all know.
 
Old 04-07-2003, 02:37 PM   #7
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Here is are the commands I used
rsync -e ssh -arz /home/httpd root@172.31.5.104:/home
rsync -e ssh -arz /var/lib/mysql root@172.31.5.104:/var/lib

As for setting up ssh - I posted this a few days ago:
http://www.linuxquestions.org/questi...threadid=53436
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Duplicating a Login Screen darknessvb Linux - Newbie 2 10-24-2004 02:52 AM
Duplicating Copyrighted CD's? The_Nerd Linux - Software 5 04-29-2004 04:02 PM
duplicating linux installs ozzy_cow Linux - General 3 04-26-2004 11:39 PM
duplicating contents of a HD peterhf Linux - Hardware 9 08-12-2003 05:30 PM
Duplicating DSL connection Half_Elf Linux - Networking 4 07-19-2002 11:05 AM


All times are GMT -5. The time now is 12:55 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration