The remote copy
WFP (Web File) can send every night the off-site copies of the subscriptions with the Remote copy service to a second Esapanel server in another place. The other server has WFPH (Web File Headless), the module that receives the remote copies: a server with WFP alone does not receive them. Two sites that copy each other each have WFP and WFPH.
The page is Modules › Remote copies. How the copies are received, on the other server, is in The received copies.
This server can only add. On the other server each subscription has its copy, with an account that keeps what is replaced or deleted: a file that this server changes or deletes there is not lost, it stays aside for the days chosen on that server. Whoever took control of this server could not destroy the remote copies.
Which subscriptions
A subscription is sent when it has the Remote copy service, in its plan or as an add-on. The service has no limits: it only says that the subscription is sent. For how many days the other server keeps what is replaced or deleted is decided by the other server, not by the plan.
The pairing
With the pairing this server makes on the other one the copy of every subscription with the service, and reads for how long each is kept and what is aside. It is the simplest way.
- On the other server, in Organization › API accounts, create an account with the Master server role and a key of its own. The key is shown only once.
- Here, in Pairing with the other server, write the Panel of the other server, with the port, as you open it in the browser (for instance
https://copies.example.com:9943), and the Key of its API account. Press Pair.
This server tries the key and, if the Server of the remote copies is not written yet, takes it from the answer of the other server. Then it makes there the copy of every subscription with the service, and of those that will get it, and writes its account here. With that key this server can only make copies and read their state: it cannot remove them nor change for how long they are kept.
If the certificate of the other panel is not signed by a recognised authority, the page shows the Certificate of the other panel, the only one accepted (SHA-256 fingerprint): the fingerprint of the certificate that answered when you paired. This server accepts only that one. Compare it with the certificate of the other panel; if the other server changes certificate, pair again. With a certificate from an authority, such as Let's Encrypt, there is no fingerprint to pin.
To undo the pairing, leave the panel of the other server empty and save: the sendings go on with the accounts written here.
Without the pairing
Without the pairing the copies are made by hand by the administrator of the other server:
- On the other server, in Received copies, add a copy for each subscription to send: paste the Public key of this server and choose for how many days it keeps what is replaced or deleted.
- Here write the Server of the remote copies and save.
- Write in Subscriptions sent, beside each subscription with the service, its Account on the other server, as the page of the copy on the other server shows it (for instance
ab12c-copy).
The server of the remote copies
- Server of the remote copies and Port: the other server and the port of rsync, usually 60022.
- Bandwidth, in KB per second: the limit of the sendings; 0 for no limit.
- The sendings start at: the hour at which the sendings of the night start.
When you save, this server reads the keys of the other server and from then on accepts only those. Compare the Fingerprints of the server shown here with those on the page of a copy on the other server: if they differ, something else answers at that address. If the other server is reinstalled with new keys, the sendings fail until you save the address again.
The Public key of this server is the one the other server accepts from this one. The private key never leaves this server; with the pairing this server gives the public key by itself.
The sendings
The sendings start at the chosen hour, one subscription at a time, and send only what has changed. A subscription with an upload in progress waits until it ends, so that a finished copy reaches the other server.
Subscriptions sent lists for each subscription the account on the other server, the Last sent, with the files sent and deleted, and the State: No account yet: not sent, Waits for the hour of the sendings, Starts within five minutes, Being sent, Sent, Failed or Copy removed on the other server. With the pairing there is also what the other server says of the copy: for how many days it keeps aside what is replaced or deleted and from which day it has the versions; in red, if the expiry is stopped there because an upload replaced or deleted a large part of the files.
Send now starts a sending without waiting for the night. When a sending fails you receive the alert "The sending of a remote copy failed", with the error; the next one is tried the night after, or with Send now.
The customer sees on the Off-site copy page of their subscription the last sending that went well, or that the last one failed.
A copy removed on the other server
With the pairing, when the administrator of the other server removes the copy of a subscription, this server notices: the subscription goes to Copy removed on the other server, the sendings stop, Send now too, and you receive the alert once, with the reason.
This server does not make the copy again by itself. If it is still wanted, press Make the copy again: the pairing makes a new one on the other server, which receives everything from the start at the first sending. An account written by hand, without the pairing, is not touched.
Getting the files back as they were
What is aside on the other server is touched only by the other server. If the copies of a subscription have been damaged or emptied, ask the administrator of the other server to rebuild the day you need (see The received copies).