1 |
Thursday, April 9, 2009, 12:09:57 AM, Momesso wrote: |
2 |
|
3 |
> On Wed, Apr 08, 2009 at 11:06:24PM +0300, Nikos Chantziaras wrote: |
4 |
>> Momesso Andrea wrote: |
5 |
>>> I'm not a professional admin, but I run a web server that was supposed |
6 |
>>> to be a small system for a couple of users (my wife and her students), |
7 |
>>> and now became something bigger with some amount of traffic, and some |
8 |
>>> people rely on it for critical data. |
9 |
>>> Since the scope of the site changed I'd like to add some extra security. |
10 |
>>> As now all I have are dayly snapshot backup of the server hard disk on |
11 |
>>> an external disk and weekly I move one of those snapshot on a disk that |
12 |
>>> I store off site and is used only for this scope. |
13 |
>>> In the same lan I also run another machine that I use as a home server |
14 |
>>> for personal purpose. |
15 |
>>> I'd like to keep a mirror of all the webapps running on the main server |
16 |
>>> in this machine for two puroposes: |
17 |
>>> 1) Have a backup working site, so that if something goes wrong, in the |
18 |
>>> time I reinstall from backup, fix hardware or wathever, I can redirect |
19 |
>>> the traffic on the salve machine (possibly in read only mode). |
20 |
>> |
21 |
>> Put them both behind a NAT. When one goes down, you NAT the port to the |
22 |
>> other machine. |
23 |
>> |
24 |
|
25 |
> Ok, nice suggestion. |
26 |
|
27 |
Use CARP (HSRP) - it's better solution IMHO and does not require |
28 |
manual work in emergency. |
29 |
|
30 |
http://www.linux.com/feature/35482 |
31 |
|
32 |
|
33 |
>>> 2) Keeping a copy of the working site on a virtual host in the other |
34 |
>>> machine allows the admin (my wife) to test new stuff, change things, add |
35 |
>>> modules, without putting in danger the main site. |
36 |
>> |
37 |
>> rsync the main machine to the second machine. You can rsync specific |
38 |
>> folders. If your website is in /var/www of the first machine, you can |
39 |
>> rsync that to the /var/www of the second for example. |
40 |
>> |
41 |
>>> What I ask is some advice on best practice to achieve the needed result; |
42 |
>>> I suppose that all I need is to rsync the webserver directory in a |
43 |
>>> virtual server on the slave machine and to dump the databases, but I'm |
44 |
>>> not sure this will be enough. |
45 |
>> |
46 |
>> rsync does the mirroring, NAT does the redirection of traffic. Those are |
47 |
>> the tools used by most to achieve what you described. |
48 |
>> |
49 |
> Ok, but what about databases? Joomla has his own and mediawiki too... |
50 |
> Just dump it and copy it? Will it work? |
51 |
|
52 |
If this is MySQL, use dump/restore. This should be enough. |
53 |
|
54 |
|
55 |
> --- |
56 |
> TopperH |
57 |
> http://topperh.blogspot.com |
58 |
|
59 |
|
60 |
|
61 |
-- |
62 |
Sergey |