You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Wilson Hernandez <wi...@optimumwireless.com> on 2011/06/10 06:43:01 UTC

[users@httpd] How to run a backup server?

Hello.

I currently have a server at home with public IP hosting 4 websites
(virtual hosting). Yesterday I had a power outage for most of the day.
As a result, no web presence.

I would like to know if there is a way to have another server somewhere
else with the same dynamic content as a "backup" in case the main server
is not available then the backup server would serve the pages.

I know, there are many things that would be involved in something like
this for ie: DNS records, both server should have the same content when
main server is updated with new info, etc...

How can I accomplish something like that?

Thanks in advanced for your assistance.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to run a backup server?

Posted by Wilson Hernandez <wi...@optimumwireless.com>.
Thanks.

This option sounds a lot simpler than first thought. I will keep this in 
mind. Also, I'm also running a DNS server in house as well, but, if no 
power at home then there will be no DNS will be resolved.


On 6/10/2011 3:55 PM, Jeroen Geilman wrote:
> On 06/10/2011 09:05 PM, Wilson Hernandez wrote:
>> Thanks for replying.
>>
>> I actually would like to have the main server locally and the backup 
>> server hosted somewhere else with: Amazon, Godaddy, etc...
>
>
> The cheapest way is to point the hostname to your home IP, and set a 
> very short TTL, say 5 minutes.
> Use the minimum your DNS hoster will accept.
>
> Then you can switch to your backup in that time frame by altering the 
> A record.
>
> This is trivially automated by running a cron script on the backup 
> server that checks if your home IP is responding, and if not, switches 
> the DNS record to itself.
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to run a backup server?

Posted by Jeroen Geilman <je...@adaptr.nl>.
On 06/10/2011 09:05 PM, Wilson Hernandez wrote:
> Thanks for replying.
>
> I actually would like to have the main server locally and the backup 
> server hosted somewhere else with: Amazon, Godaddy, etc...


The cheapest way is to point the hostname to your home IP, and set a 
very short TTL, say 5 minutes.
Use the minimum your DNS hoster will accept.

Then you can switch to your backup in that time frame by altering the A 
record.

This is trivially automated by running a cron script on the backup 
server that checks if your home IP is responding, and if not, switches 
the DNS record to itself.


-- 
J.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to run a backup server?

Posted by Patrick Proniewski <pa...@univ-lyon2.fr>.
Hello,

On 10 juin 2011, at 21:05, Wilson Hernandez wrote:

> I actually would like to have the main server locally and the backup server hosted somewhere else with: Amazon, Godaddy, etc...



Having the main server running at the less reliable location is not what I would do, but I can understand how a local server with full physical control (and huge storage) is easier to run than a remote VPS with limited resources and access.



On 10 juin 2011, at 21:55, Jeroen Geilman wrote:

> Then you can switch to your backup in that time frame by altering the A record.
> 
> This is trivially automated by running a cron script on the backup server that checks if your home IP is responding, and if not, switches the DNS record to itself.


I don't think this is trivially automated. There are lots of pitfalls (reliability of the test, accessing DNS records...) that makes this kind of script more tricky than you would think.

Wilson: you should really consider externalizing your master DNS. Running a local secondary DNS is fine, but your primary should be remote (on your backup server for example).


Patrick PRONIEWSKI
-- 
Administrateur Système - DSI - Université Lumière Lyon 2


Re: [users@httpd] How to run a backup server?

Posted by Wilson Hernandez <wi...@optimumwireless.com>.
Thanks for replying.

I actually would like to have the main server locally and the backup 
server hosted somewhere else with: Amazon, Godaddy, etc...



On 6/10/2011 8:22 AM, Patrick Proniewski wrote:
> On 10 juin 2011, at 11:21, Igor Galić wrote:
>
>> I'm wondering if it isn't really cheaper (and saner, and healthier)
>> to just get a VPS somewhere...
>
> Being "somewhere" (including the could) still leaves you with a probability of an outage. The VPS can crash, can be DDoSed, can be hacked... The infrastructure supporting the VPS can crash, loose data, etc.
> Speaking of limiting downtimes, it's of course safer to have a virtual server in the cloud (say amazon for example), because they provide a very strong infrastructure, and redundancy.
>
>
> Patrick PRONIEWSKI


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to run a backup server?

Posted by Patrick Proniewski <pa...@univ-lyon2.fr>.
On 10 juin 2011, at 11:21, Igor Galić wrote:

> I'm wondering if it isn't really cheaper (and saner, and healthier)
> to just get a VPS somewhere...


Being "somewhere" (including the could) still leaves you with a probability of an outage. The VPS can crash, can be DDoSed, can be hacked... The infrastructure supporting the VPS can crash, loose data, etc.
Speaking of limiting downtimes, it's of course safer to have a virtual server in the cloud (say amazon for example), because they provide a very strong infrastructure, and redundancy.


Patrick PRONIEWSKI
-- 
Administrateur Système - DSI - Université Lumière Lyon 2


Re: [users@httpd] How to run a backup server?

Posted by John Hudak <jj...@gmail.com>.
I don't know the details of what you are attempting, however, from my
reading of the issue, you want a reliable backup of your server
configuration.  Someone suggested a VPS which, in my mind is a reasonable
solution. I interpreted your reaction to this possibility as way too
expensive because of the size of the DB that must be moved onto the VPS.
While the db may not cost you money (but it actually does b/c you need to
buy the disks plus your maintenance is whatever $/hr your put on your time),
the orgs that offer the VPS do put a price on it. There is a conflict in
this scenario...The size of the DB conflicts with the VPS approach.

As in Igor's posting reference,  spending money should be the initial
consideration, as it will probably free up time for things that address more
important orgazational concerns. Often times, spending time figuring out
clever code solutions turns out to be 'penny wise and dollar foolish'.
The approach to do it yourself, as you pointed out, may not be that
difficult.  If there are concerns related to the 'roll your own' approach,
such as time, or cost, etc, then they need to be considered as well.

-J


On Tue, Jun 14, 2011 at 11:33 AM, Lester Caine <le...@lsces.co.uk> wrote:

> John Hudak wrote:
>
>> Hmmm well in *that* case, seems like your choices are:
>> 1. pay for VPS
>> 2. relax your constraint about 5 TB of data
>> 3. build a server center from the ground up with reliable power (among
>> other things).
>>
>> Pays yer money, takes yer choice. You may *like* to use a real DB, but
>> are you willing to pay for it?  Seems like an unresolvable conflict to me.
>>
>
> My point was more - it's not expensive or difficult to do what was
> originally asked for yourself! The database costs ME nothing, automatically
> handles replication between sites, and can be expanded to any size. Some
> firebird powered sites are runing databases in the hundreds of Gigabytes -
> and simply replicate critical business data across machines. Middle layer
> simply accesses an available machine.
>
> I keep being told I can 'save money' by only paying for what I need using
> one of these virtual systems, but in my case I'd also have to loose
> capability to get things DOWN to the level I currently pay. There is no
> conflict ... the problem is more one of what you need the backup for? That
> will determin which is the best route.
>
>
> --
> Lester Caine - G8HFL
> -----------------------------
> Contact - http://lsces.co.uk/wiki/?page=contact
> L.S.Caine Electronic Services - http://lsces.co.uk
> EnquirySolve - http://enquirysolve.com/
> Model Engineers Digital Workshop - http://medw.co.uk//
> Firebird - http://www.firebirdsql.org/index.php
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>  "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] How to run a backup server?

Posted by Lester Caine <le...@lsces.co.uk>.
John Hudak wrote:
> Hmmm well in *that* case, seems like your choices are:
> 1. pay for VPS
> 2. relax your constraint about 5 TB of data
> 3. build a server center from the ground up with reliable power (among
> other things).
>
> Pays yer money, takes yer choice. You may *like* to use a real DB, but
> are you willing to pay for it?  Seems like an unresolvable conflict to me.

My point was more - it's not expensive or difficult to do what was originally 
asked for yourself! The database costs ME nothing, automatically handles 
replication between sites, and can be expanded to any size. Some firebird 
powered sites are runing databases in the hundreds of Gigabytes - and simply 
replicate critical business data across machines. Middle layer simply accesses 
an available machine.

I keep being told I can 'save money' by only paying for what I need using one of 
these virtual systems, but in my case I'd also have to loose capability to get 
things DOWN to the level I currently pay. There is no conflict ... the problem 
is more one of what you need the backup for? That will determin which is the 
best route.

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to run a backup server?

Posted by Jeroen Geilman <je...@adaptr.nl>.
On 06/14/2011 03:53 PM, Igor Galić wrote:
>
> ----- Original Message -----
>> Hmmm well in *that* case, seems like your choices are:
>> 1. pay for VPS
>> 2. relax your constraint about 5 TB of data
>> 3. build a server center from the ground up with reliable power
>> (among other things).
>>
>> Pays yer money, takes yer choice. You may *like* to use a real DB,
>> but are you willing to pay for it? Seems like an unresolvable
>> conflict to me.
>
> http://teddziuba.com/2010/12/the-3-basic-tools-of-systems-engineering.html
>
> i

" Database: PostgreSQL or Oracle if you can afford it.
     If you're using a NoSQL database, you fucked up somewhere."

+1

-- 
J.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to run a backup server?

Posted by Igor Galić <i....@brainsware.org>.

----- Original Message -----
> Hmmm well in *that* case, seems like your choices are:
> 1. pay for VPS
> 2. relax your constraint about 5 TB of data
> 3. build a server center from the ground up with reliable power
> (among other things).
> 
> Pays yer money, takes yer choice. You may *like* to use a real DB,
> but are you willing to pay for it? Seems like an unresolvable
> conflict to me.


http://teddziuba.com/2010/12/the-3-basic-tools-of-systems-engineering.html

i

> -J
> 
> 
> 
> On Mon, Jun 13, 2011 at 5:06 AM, Lester Caine < lester@lsces.co.uk >
> wrote:
> 
> 
> 
> Igor Galić wrote:
> 
> 
> 
> 
> Then I have the machines set up to rsync regularly and also rsync to
> another machine at my ISP. I don't use MySQL myself, Firebird handles
> replication between machines, and incremental backups for me.
> 
> 
> 
> I'm wondering if it isn't really cheaper (and saner, and healthier)
> to just get a VPS somewhere...
> 
> In my case, cost of storage makes the hosted options silly money. I'm
> running 5Tb here but only have 500Mb on the remote service. That and
> I like to use a REAL database which is not generally available ;)
> 
> --
> 
> 
> 
> Lester Caine - G8HFL
> -----------------------------
> Contact - http://lsces.co.uk/wiki/?page=contact
> L.S.Caine Electronic Services - http://lsces.co.uk
> EnquirySolve - http://enquirysolve.com/
> Model Engineers Digital Workshop - http://medw.co.uk//
> Firebird - http://www.firebirdsql.org/index.php
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server
> Project.
> See <URL: http://httpd.apache.org/userslist.html > for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> 

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to run a backup server?

Posted by John Hudak <jj...@gmail.com>.
Hmmm well in *that* case, seems like your choices are:
1. pay for VPS
2. relax your constraint about 5 TB of data
3. build a server center from the ground up with reliable power (among other
things).

Pays yer money, takes yer choice. You may *like* to use a real DB, but are
you willing to pay for it?  Seems like an unresolvable conflict to me.

-J


On Mon, Jun 13, 2011 at 5:06 AM, Lester Caine <le...@lsces.co.uk> wrote:

> Igor Galić wrote:
>
>> Then I have the machines set up to rsync regularly and also rsync to
>>> another machine at my ISP. I don't use MySQL myself, Firebird handles
>>> replication between machines, and incremental backups for me.
>>>
>>
>  I'm wondering if it isn't really cheaper (and saner, and healthier)
>> to just get a VPS somewhere...
>>
>
> In my case, cost of storage makes the hosted options silly money. I'm
> running 5Tb here but only have 500Mb on the remote service. That and I like
> to use a REAL database which is not generally available ;)
>
> --
> Lester Caine - G8HFL
> -----------------------------
> Contact - http://lsces.co.uk/wiki/?page=contact
> L.S.Caine Electronic Services - http://lsces.co.uk
> EnquirySolve - http://enquirysolve.com/
> Model Engineers Digital Workshop - http://medw.co.uk//
> Firebird - http://www.firebirdsql.org/index.php
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>  "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] How to run a backup server?

Posted by Lester Caine <le...@lsces.co.uk>.
Igor Galić wrote:
>> Then I have the machines set up to rsync regularly and also rsync to
>> another machine at my ISP. I don't use MySQL myself, Firebird handles
>> replication between machines, and incremental backups for me.

> I'm wondering if it isn't really cheaper (and saner, and healthier)
> to just get a VPS somewhere...

In my case, cost of storage makes the hosted options silly money. I'm running 
5Tb here but only have 500Mb on the remote service. That and I like to use a 
REAL database which is not generally available ;)

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to run a backup server?

Posted by Igor Galić <i....@brainsware.org>.

----- Original Message -----
> Patrick Proniewski wrote:
> >> I would like to know if there is a way to have another server
> >> somewhere
> >> >  else with the same dynamic content as a "backup" in case the
> >> >  main server
> >> >  is not available then the backup server would serve the pages.
> > Whatever solution you choose, it's not Apache related.
> > It's a very complex task, and the solution greatly depends on the
> > price you are willing to pay.
> > If your problem is power-related, you need a second server far
> > enough so that it won't be hit by the same power outage. The
> > cheapest way is to allow for some downtime, and manually change
> > DNS so that your domain names points toward one server or the
> > other. The shorter your DNS TTL is, the shorter your downtime can
> > be, but the more requests your DNS will have to handle. As for
> > data replication, few shell script should help (mysql dump and
> > rsync files every hour for example).
> > This is mostly handcrafted solution, but it's the cheapest.
> 
> It's not as bad as that makes it sound ;)
> 
> One my internet connection here I have a stand alone router which
> handles the
> line and acts as firewall. WHICH machine appears as port 80 on the
> internet is
> just a matter of switching over an entry in the router. ISP's have a
> bigger
> version of that handling many machines ...
> 
> Then I have the machines set up to rsync regularly and also rsync to
> another
> machine at my ISP. I don't use MySQL myself, Firebird handles
> replication
> between machines, and incremental backups for me.


I'm wondering if it isn't really cheaper (and saner, and healthier)
to just get a VPS somewhere...

> --
> Lester Caine - G8HFL
> -----------------------------
> Contact - http://lsces.co.uk/wiki/?page=contact
> L.S.Caine Electronic Services - http://lsces.co.uk
> EnquirySolve - http://enquirysolve.com/
> Model Engineers Digital Workshop - http://medw.co.uk//
> Firebird - http://www.firebirdsql.org/index.php
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to run a backup server?

Posted by Lester Caine <le...@lsces.co.uk>.
Patrick Proniewski wrote:
>> I would like to know if there is a way to have another server somewhere
>> >  else with the same dynamic content as a "backup" in case the main server
>> >  is not available then the backup server would serve the pages.
> Whatever solution you choose, it's not Apache related.
> It's a very complex task, and the solution greatly depends on the price you are willing to pay.
> If your problem is power-related, you need a second server far enough so that it won't be hit by the same power outage. The cheapest way is to allow for some downtime, and manually change DNS so that your domain names points toward one server or the other. The shorter your DNS TTL is, the shorter your downtime can be, but the more requests your DNS will have to handle. As for data replication, few shell script should help (mysql dump and rsync files every hour for example).
> This is mostly handcrafted solution, but it's the cheapest.

It's not as bad as that makes it sound ;)

One my internet connection here I have a stand alone router which handles the 
line and acts as firewall. WHICH machine appears as port 80 on the internet is 
just a matter of switching over an entry in the router. ISP's have a bigger 
version of that handling many machines ...

Then I have the machines set up to rsync regularly and also rsync to another 
machine at my ISP. I don't use MySQL myself, Firebird handles replication 
between machines, and incremental backups for me.

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to run a backup server?

Posted by Patrick Proniewski <pa...@univ-lyon2.fr>.
Hello,

On 10 juin 2011, at 06:43, Wilson Hernandez wrote:

> I would like to know if there is a way to have another server somewhere
> else with the same dynamic content as a "backup" in case the main server
> is not available then the backup server would serve the pages.

Whatever solution you choose, it's not Apache related.
It's a very complex task, and the solution greatly depends on the price you are willing to pay.
If your problem is power-related, you need a second server far enough so that it won't be hit by the same power outage. The cheapest way is to allow for some downtime, and manually change DNS so that your domain names points toward one server or the other. The shorter your DNS TTL is, the shorter your downtime can be, but the more requests your DNS will have to handle. As for data replication, few shell script should help (mysql dump and rsync files every hour for example).
This is mostly handcrafted solution, but it's the cheapest. 

Patrick PRONIEWSKI
-- 
Administrateur Système - DSI - Université Lumière Lyon 2