Storage Migration during uptime

Automatic migration of data on backend storage

General information

PowerFolder stores files and directories on the backend storage in a structure almost identical to the structure shown in web portal (or mobile apps und clients). The structure (expected path) stored on the backend is by default: /PowerFolders/username/foldername. However sometimes the structure on the backend storage may differ as seen in the frontend, especially

  • after a (top-level) folder rename
  • changing the username of an account
  • after passing a folder from one to another owner
  • changing the storage base dir for folders (Migrating from one storage to another)

For this reason PowerFolder offers a function to automatically move folders/data on the backend to the expected path to 100% reflect the frontend structure (“storage migration”) during runtime. By default this function is turned off. When this function is enabled PowerFolder will check the actual path of folders against the expected path. If these differ PowerFolder moves the data/folders on the backend to the expected path. This produces slightly I/O, but improves maintainability of the backend storage. During the time of migration the folder is not available to the end users. Usually this operation takes only milliseconds since a filesystem move operation is used, but may involve a copy/delete between different filesystems. The operation is also done delayed in the background so that the impact on the users experience is not noticeable.

Configuration

To control this function use the following configuration entries:

folder.storage.path.report=false

if set to true, PowerFolder will report how only how it would migrate (move) the data. (info) No filesystem operation is executed.

unless set:

folder.storage.path.check=false

If set to true, PowerFolder will migrate (move) data, which is not at the expected path.

storage.stickyness.accounts=false

if set to true, PowerFolder will keep home directories for accounts at the same storage they where initially placed/created.

(info) Highly recommended to set to true if you are using multiple storages. (warning) Otherwise PowerFolder migrates all account data to a single storage.

(lightbulb) TIPs

First let PowerFolder report (.report=true) before actually activating this function (.check=true) and check if the logs describe the designated outcome.

(warning) If you are unsure how to operate this function please contact the PowerFolder Support.

Use API all for single accounts to check the desired outcome of the function in your setup:

API-Call

To execute this function for folders of a single account you may use the API:

http://apidoc.powerfolder.com/#api-Accounts-GetApiAccountsActionCorrectstoragepaths