JSOPanel Get started
Help Center › Administrators › Keeping a second server in sync

Keeping a second server in sync

How to keep a continuously updated copy of an account on a separate server, ready for failover.

The Second Server feature keeps an up-to-date copy of a hosting account's files and databases on a separate physical server, so that if the primary server ever goes down, you already have a current copy ready to take over, rather than needing to restore from a backup, which could be hours old and takes time to bring back online. Only the original server ever writes to the live site, so the two copies can never disagree.

Before you start: two servers need to trust each other

The two servers have to be told to trust each other before anything can be copied between them, and this is done once, in both directions:

  1. On the server that will hold the standby copies, click Second Server in the sidebar, and under Step 1: let another server copy to this one, paste the other server's key, shown on its own Second Server page under Step 2, and click Trust that server.
  2. On the server that runs the live sites, do the same in reverse: paste the standby server's key into ITS Step 1 box.

Setting up a copy

  1. On the server that runs the live sites, click Second Server in the sidebar.
  2. Enter the account to copy, the standby server's address, its SSH port, and how often it should be copied (from every hour up to once a day).
  3. Click Connect and copy now.

The first copy starts as soon as you press this, and JSOPanel keeps that account's files, mail, and databases up to date on the standby server automatically from then on, in the background.

Optional: routing visitors automatically

Once a copy has finished, the standby server's own Second Server page offers an Answer visitors from a copy option: it can share ordinary visitor traffic with the live server while the live server keeps handling anything that changes something, such as signing in. This is entirely separate from copying itself and can be switched on and off at any time without affecting the copy.

Tip: keeping a second server in sync is about being ready. It doesn't switch anything over by itself unless you set that up. See the article on switching over to a second server for the actual failover process. And when taking any of this apart again, do it in the opposite order you built it: stop answering visitors first, then stop copying last.

Checking sync status

The Second Server page shows when each account was last copied, right next to a Copy now button for copying it immediately and a View log link for that account's own copy output, so you can confirm everything is up to date and catch any account that's fallen behind.

Forgetting a server you no longer trust

The Servers trusted here card lists every server currently trusted to copy accounts onto this one. Click Forget this server beside one to remove its trust entirely, useful if a server is being retired or was trusted by mistake. This only affects trust, not any copy already in progress.

Restricting what a trusted server's key may do

Restricted SSH commands limits a trusted server's own key to only the specific commands this feature actually needs, rather than full server access. Every server turns this on by itself automatically the first time it trusts a new peer, there's nothing to press for a pairing set up from here on. The control on this card only matters for a pairing trusted before this was automatic, or if you deliberately want to turn it back off for one.

Cleaning up copies you've stopped keeping

When you stop copying an account, its files aren't deleted immediately, they move into Stopped copies still on this server on the standby server's own page, in case you change your mind. From there, click Delete permanently to reclaim the disk space for good, this cannot be undone.