Skip to content

WFP: datastores and relocation

WFP (Web File) keeps the off-site copies of the customers in one or more datastores: folders of the server, best each on a disk of its own, which hold the files of the subscriptions. The page is Modules › Off-site datastores.

Datastores

The first datastore is born with the module, in the folder given with --wfp-datastore at the installation (see Installation).

To add one, mount the new disk and run on the server, as root:

esapanel-setup --modules=csp,wfp --wfp-add-datastore=/mnt/disk2/wfp

with all the installed modules in --modules. The datastore appears on the page within five minutes. The folder cannot be under /home, /root or /run. The panel never chooses a folder of the server by itself.

For each datastore the page shows the Folder, how much of its disk is In use and Free, and how many Subscriptions it holds.

  • At 80% and 90% you receive a warning.
  • At 95% its accounts become read only, until it goes below 90%.
  • "Not found on the server: is its disk mounted?" means the folder is no longer there: check the mount.

New subscriptions: the datastore where the subscriptions created from now on are born (Make them here). The existing ones stay where they are: move them with Relocate.

Relocation

Relocate moves the files to another datastore, for example to empty a disk to replace or to balance the space. In What to relocate choose A subscription, A customer, or a reseller with its customers or Every subscription of a datastore, and To the datastore.

The subscriptions move one at a time, in three steps:

  1. Copying, accounts working: the files are copied while the accounts keep working, for as long as it takes;
  2. Last copy, accounts stopped: the last copy is made with the accounts stopped, so it finds the files still. It lasts the time to read the list of the files again, usually a few minutes; a backup that starts in those minutes fails and is made again at the next round;
  3. the subscription moves to the new datastore and is verified. Accounts, passwords, keys and addresses do not change: there is nothing to change on the devices of the customers.

You receive a warning when a relocation is over and when it fails. A relocation that fails leaves the subscription where it was, working. Cancel stops a relocation under way and removes its copy.

The old folder

After a relocation the old folder stays in the datastore it left, and takes its space. Remove the old folder when you have seen that the copies arrive in the new datastore: it cannot be undone. Until then the same subscription cannot be relocated again.

The remote copy

The off-site copies of the subscriptions with the Remote copy service can be sent every night to a second Esapanel server in another place, also with WFP.

This server can only add. On the other server each subscription has an account of its own, which keeps what is replaced or deleted for the days chosen there. Whoever took control of this server could not destroy the remote copies.

To set it up:

  1. On the other server create an off-site copy subscription and, inside it, one account for each subscription to send, with rsync only. On the page of the account paste the Public key of this server and choose for how many days it keeps what is replaced or deleted.
  2. Here, in Remote copies, write the Server of the remote copies and save. Compare the Fingerprints of the server shown with those on the page of the account on the other server: if they differ, something else answers at that address.
  3. Give the Remote copy service to a subscription, in its plan or as an add-on, and write here its Account on the other server.

The transfers start at the chosen time, one subscription at a time, and send only what changed; you can limit the Bandwidth, in KB per second. Send now starts one without waiting for the night. When a transfer fails you receive a warning; the next one is tried the night after.

Verification and repair

Every night the panel compares what the server has for each subscription with what it knows. The differences, and the Repair that fixes them, are on the Off-site copy page of each subscription (see the reseller manual, "Modules for the reseller"). When the verification finds differences you receive a warning.