Gentoo Archives: gentoo-user

From: Nikos Chantziaras <realnc@×××××.de>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: Web server mirror
Date: Wed, 08 Apr 2009 20:06:45
Message-Id: grj03m$3cp$1@ger.gmane.org
In Reply to: [gentoo-user] Web server mirror by Momesso Andrea
1 Momesso Andrea wrote:
2 > I'm not a professional admin, but I run a web server that was supposed
3 > to be a small system for a couple of users (my wife and her students),
4 > and now became something bigger with some amount of traffic, and some
5 > people rely on it for critical data.
6 >
7 > Since the scope of the site changed I'd like to add some extra security.
8 > As now all I have are dayly snapshot backup of the server hard disk on
9 > an external disk and weekly I move one of those snapshot on a disk that
10 > I store off site and is used only for this scope.
11 >
12 > In the same lan I also run another machine that I use as a home server
13 > for personal purpose.
14 > I'd like to keep a mirror of all the webapps running on the main server
15 > in this machine for two puroposes:
16 >
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 > 2) Keeping a copy of the working site on a virtual host in the other
26 > machine allows the admin (my wife) to test new stuff, change things, add
27 > modules, without putting in danger the main site.
28
29 rsync the main machine to the second machine. You can rsync specific
30 folders. If your website is in /var/www of the first machine, you can
31 rsync that to the /var/www of the second for example.
32
33
34 > What I ask is some advice on best practice to achieve the needed result;
35 > I suppose that all I need is to rsync the webserver directory in a
36 > virtual server on the slave machine and to dump the databases, but I'm
37 > not sure this will be enough.
38
39 rsync does the mirroring, NAT does the redirection of traffic. Those
40 are the tools used by most to achieve what you described.

Replies

Subject Author
Re: [gentoo-user] Re: Web server mirror Momesso Andrea <momesso.andrea@×××××.com>