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, format the new disk and mount it on its folder, with a line in /etc/fstab so that it stays mounted after a restart. Then 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.
Encrypted datastores
Encrypting a datastore is a choice: the plain one, described above, needs nothing else. A datastore on a disk of its own can be encrypted, when the data of the panel are encrypted too (see Encryption of the data). Before adding it, on the new empty disk, without formatting or mounting it:
esapanel-data encrypt-datastore /dev/sdc /srv/wfp/ds2
esapanel-setup --modules=csp,wfp --wfp-add-datastore=/srv/wfp/ds2
Its key is on the encrypted disk of the data, so it opens and closes with them at each start; its recovery key is shown only once. On the page the datastore is marked Encrypted. A datastore already in use is not encrypted in place: add an encrypted one and relocate the subscriptions there.
What the page shows
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:
- Copying, accounts working: the files are copied while the accounts keep working, for as long as it takes;
- 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;
- 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 sending of the copies to a second server, with WFPH (Web File Headless), is in The remote copy.
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 Verification and repair). When the verification finds differences you receive a warning.