Skip to content

The received copies

This page is for the administrator of the server that receives the remote copies, with WFPH (Web File Headless). How the server with WFP (Web File) sends them is in The remote copy. The page of the panel is Modules › Received copies.

Installation

WFPH is installed with esapanel-setup, like the other modules (see Installation):

esapanel-setup --modules=wfph --wfp-datastore=/srv/wfp/ds1

It installs only the datastore of the copies, best on a disk of its own, and rsync over SSH on port 60022: the firewall opens that port, besides those of the panel. With WFP on the same server (--modules=wfp,wfph) the datastore and rsync are those of WFP. The module must also be in the license.

How it works

On this server there is a received copy for each subscription that the server that sends copies here, with its account. Every night the server that sends uploads with rsync what has changed.

The account of a copy can only add: a file that the server that sends replaces or deletes is put aside, with its path, in a folder of the day that the account does not reach. It stays there for the days of the copy; then this server removes it for good.

The server that sends can make copies and read their state, but it cannot remove them nor change for how long they are kept. Keeping, expiry and deletion are decided here only.

Adding a copy

With the pairing

With the pairing it is the server that sends that makes its copies here: one for each subscription with the Remote copy service, also those that get the service later.

  1. In Organization › API accounts create an account with the Master server role and a key of its own. The key is shown only once.
  2. Give the administrator of the server that sends the address of this panel, with the port, and the key: they write them in their Remote copies page.

The copies appear in the list with the starting days of keeping; you can change them on the page of each copy. To take away from the server that sends the possibility of making copies, revoke the key in Organization › API accounts.

By hand

  1. On the Remote copies page of the server that sends, copy the Public key of this server.
  2. Here press Add a copy and write:
    • Whose copy it is: the server that sends, the customer and the subscription, what you need to find it again the day it must be recovered;
    • Code on the server that sends, if you like: the five characters beside the subscription in its Remote copies page;
    • Public key of the server that sends: the whole line, from ssh-ed25519 or ssh-rsa;
    • Keep what is replaced or deleted for: from 7 to 365 days.
  3. On the page of the copy, in What the server that sends needs, you find Server, Port and Account, to write in the Remote copies page of the server that sends, and the Fingerprints of this server. Compare them with those the server that sends shows when its administrator saves: if they differ, another server answers at that address.

The list

For each copy the list shows the Account, the Space it takes, including what is aside, the Last upload, for how many days it keeps things aside (Kept aside for) and the State:

  • Receiving: all is well;
  • Expiry stopped: see below;
  • Not made on the server: the server could not write the account. Open the copy, read the error and press Try again.

The space is measured once a day. The last upload is updated when the session of the server that sends closes.

The page of a copy

  • What the server that sends needs: server, port, account and fingerprints, as above.
  • Change: whose copy it is, the public key of the server that sends (if it is reinstalled it has a new one) and for how many days what is replaced or deleted is kept. A shorter time applies from the next daily check and removes what is older.
  • Kept aside: for each Day, the Files replaced or deleted by the uploads of that day and their Size. The list is made once a day.

Expiry stopped

When an upload replaces or deletes a large part of the files of a copy, nothing of what that copy has aside expires any more, and you receive the alert "An upload replaced or deleted a large part of the files of a received copy". The page of the copy says which day the upload is of; the server that sends shows it in red on its Remote copies page.

It may be a reorganisation of the copies, or somebody who emptied or encrypted them on the server that sends, or on the device of the customer. Talk to whoever runs the server that sends. When everything is in order, press Resume the expiry: what is aside expires again.

Rebuilding a day

Rebuild a day puts together again what the copy had at the end of a day, as if the uploads of the following days had never happened. It is for when the copies on the server that sends have been damaged or emptied, for instance by ransomware that encrypted the NAS of the customer before the backup, and you need them as they were before.

  1. Choose the Day, among those the copy keeps, and press Rebuild. One day at a time is rebuilt for each copy.
  2. When it is ready, the day shows with its Folder on this server, the Files and the size. It takes no more space: the files are the same ones, linked.
  3. Take the files from that folder, or have the server that sends read the rebuilt day back, with its account.

A rebuilt day is removed by itself after 7 days; until then it holds its files even beyond the days of the copy. Remove removes it earlier.

Rebuilding relies on the day each file arrived on this server: the disk of the datastore must record it, as ext4, XFS and btrfs do. A copy moved to another disk, or restored from a backup, cannot be rebuilt for the days before the move.

Removing a copy

Remove the copy: the server that sends cannot sign in any more. The files, with what is aside, stay on this server for 30 days and are then removed for good.

With the pairing the server that sends notices it: it stops sending that subscription and alerts its administrator, who can make a new copy with Make the copy again.

The license

The license of this server can limit how many copies it receives and how much space they take. Over a limit the panel refuses only a new copy and says so ("The license of this server allows … received copies", "The received copies already take … of the … the license of this server allows"): remove a copy, free some space or extend the license. The copies that exist go on receiving.