Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Backup server
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Backup server

omw2postomw2post Member

Hey,
I have a DNS zone on a server running DirectAdmin & CloudLinux
ns1.domain.com and ns2.domain.com are pointing to its IP (1.1.1.1)

What is the best practice to create a backup server that will be used when main server is down?

I thought about using rsync, SQL Replication, and setting up a DNS Zone on both servers:
ns1 points to 1.1.1.1 and ns2 to 1.1.2.2

But I have a few concerns still:
Do I need to have DirectAdmin on both servers? or can I run a different panel on the second server (with OLS support), what about CloudLinux?
What happens if someone is trying to write to the slave DB? like posting a new wordpress post.

Maybe the way I am thinking of doing it is wrong, so back to my question:
What would be the best practice to achieve that replication?

Thanks.

Thanked by 1helloitsmeagain

Comments

  • tentortentor Member, Patron Provider
    edited March 20

    I have some doubts that such setup is possible with a DirectAdmin control panel. Usually, when configuring HA, you need to ensure that your application is compatible with such setup - proper database architecture (to ensure reliable replication), files are stored at an external S3 for example (much easier comparing to your rsync approach - however syncing application source is simple task either). I am sure it is extremely complex for shared hosting environment, something I would consider as almost impossible to implement.

    The easiest part is DNS - you don't even need multiple control panels on different servers, syncing multiple slaves from a single master may be as simple as plain AXFR.

  • MadMad Member

    You should be considering a cluster-based control panel.

    Enhance.com might be a good solution for this:
    https://enhance.com/docs/technical-guidance/cluster-configurations.html

  • SharedGridSharedGrid Member
    edited March 20

    @Mad said:
    You should be considering a cluster-based control panel.

    Enhance.com might be a good solution for this:
    https://enhance.com/docs/technical-guidance/cluster-configurations.html

    +1 for Enhance.

    There's no replication between 'application' or email servers though. For example, if there was a DR scenario then you select to restore the data from the offline server which takes the backup from the backup server to another application or email server of your choice.

    The DNS servers are cluster wide so there's no need to do any trickery with those.

    Thanked by 1COLBYLICIOUS
  • @Mad said:
    You should be considering a cluster-based control panel.

    Enhance.com might be a good solution for this:
    https://enhance.com/docs/technical-guidance/cluster-configurations.html

    Can't do CloudLinux + Enhance panel as far as I know

    Thanked by 1helloitsmeagain
  • vsys_hostvsys_host Member, Patron Provider

    Agree with @tentor
    The easiest setup for WP would be an S3 upload module and Percona as a MySQL server, but there is no place for control panels with this setup.

  • Enhance Control Panel can do that, I think it's called disaster recovery.

    https://enhance.com/docs/server-management/disaster-recovery.html

  • tentortentor Member, Patron Provider

    @COLBYLICIOUS said:
    Enhance Control Panel can do that, I think it's called disaster recovery.

    https://enhance.com/docs/server-management/disaster-recovery.html

    This is only an automation to restore the backup, not an active replication that allows to have exact copies of the data on two different servers continuously.

    Thanked by 1yongsiklee
  • MadMad Member

    @tentor said:

    @COLBYLICIOUS said:
    Enhance Control Panel can do that, I think it's called disaster recovery.

    https://enhance.com/docs/server-management/disaster-recovery.html

    This is only an automation to restore the backup, not an active replication that allows to have exact copies of the data on two different servers continuously.

    True and I'm not sure there's even a control panel handling it.
    I'd rather go with lsyncd or drbd.

  • Hello,

    For setting up a backup server for your DNS zone, your plan with rsync, SQL replication, and setting up DNS zones on both servers seems reasonable. However, ensure consistency in server panels and handle database writes carefully to prevent conflicts. Testing failover procedures is crucial for smooth operation.

  • edited March 28

    @omw2post said: I have a DNS zone on a server running DirectAdmin & CloudLinux

    Set up a secondary server with DirectAdmin and CloudLinux, replicate files via rsync, and use MySQL replication for database synchronization. Ensure both servers have the same configuration to allow for seamless failover.

Sign In or Register to comment.