Support This Project

site backend

Description

Performs a number of different backend related operations to wzdftpd.

Syntax

site backend <command> [<backend>] 

Detailed information on the options/arguments: <backend>

<command> can be one of:

  • close - unload/remove a loaded and active backend from use.
  • commit - save all changes to the backend, preventing data loss in the case of a hard shutdown (power outage, etc).
  • init - load/add a new backend to wzdftpd, and make it active for use.
  • reload - closes a backend and then reloads it, without ever committing the in-memory state.

Limitations

  • This site command is dangerous and if misused, can make your server unstable, or worse.
  • Don't unload a backend that is in use (try kicking all users first, and prevent new logins).
  • Always make sure you have at least one backend loaded.
  • Make sure you're not loading a conflicting backend.
  • Reloading a backend will cause all current in-memory changes to be lost. If you want this data saved, commit the changes manually before reloading!

Examples

site backend close plaintext

This command will unload the plaintext backend from wzdftpd, preventing it from being used for reading/storing/verifying user data.

site backend commit plaintext

Write all in-memory user data to the plaintext backend, so it is physically stored in the user data file.

site backend init mysql

Loads the mysql backend into wzdftpd, making it ready to use for reading/verifying/saving user data.

site backend reload pgsql

Reloads user data from the pgsql backend, overwriting the in-memory data.