PidFile - boxbackup/boxbackup GitHub Wiki

PidFile Option

Whenever a Box Backup daemon (background process) is running, it will create a file called the PID (Process ID) file. This file just contains the numeric process ID assigned by the operating system to the process. It can be used to shut down the process from a script, by sending a signal to it (on Unix) or terminating it (on Windows).

The relevant daemons are the client (bbackupd) and server (bbstored).

The file is deleted when the daemon shuts down normally. It will be left in place if the daemon dies due to an unhandled internal error (which should never happen) or the process is terminated by the operating system without having a chance to clean up.

Normally, the existence of this file indicates that the process is running normally, and the absence of it indicates that the process died or failed to start properly.

The PID file is named by the PidFile option in the Server section of the configuration file, for example:

Server
{
        PidFile = /var/bbackupd/bbackupd.pid
}

Your operating system may have a default location for PID files where it's recommended to keep them, and in this case the Box Backup PID files should be stored there as well. For example, many Linux, BSD and other Unix systems use /var/run. On Windows, or on Unix if you prefer, you can place the file in the DataDirectory.

The name of the file is not particularly important, but we recommend using bbackupd.pid or bbstored.pid for consistency, and on Unix systems to avoid conflict with other PID files written by other programs.