๐Ÿ“‚ Data Structure

When the ConHive Agent runs for the first time, it creates a workspace to store all its data. By default, this workspace is located at ~/.conhive/agent/. In the root of the workspace, you'll find a JSON file containing the module configuration settings along with the following directories:

  • config: Contains JSON configuration files for each module.
  • data: Stores all runtime data, including a SQLite database file.
  • log: Holds the agentโ€™s log files.

๐Ÿ’พ Data Folder

The data folder includes a SQLite database file that the agent uses to store its information. The data is organized into tables that are created automatically. In addition, the folder may include subdirectories for specific data types. If you enable automatic database backups, the backup files will be stored in a designated backup folder.

๐Ÿ—’๏ธ Log Folder

The log folder records all activities performed by the agent. Log files are generated automatically and rotated on a daily basis, ensuring you have continuous access to recent activity logs.

โš™๏ธ Configuration Files

The ConHive Agent is built with flexibility in mind. Each module has its own JSON configuration file located in the configs directory within the agentโ€™s workspace. If a configuration file is missing for a particular module, the agent will fall back to default settings.

๐Ÿ”„ Backup and Recovery

When operating in standalone mode, the ConHive Agent saves data locally on the device. It is important to back up this data regularly to prevent data loss. There are two primary methods for backing up your data:

Manual Backup

  • SQLite Database Backup:
    The SQLite database file is located in the data folder. To create a manual backup, simply copy the database file to a secure location or another device.

Automatic Backup

  • Configuration-Based Backup:
    You can configure the agent to automatically back up the database at regular intervals. To enable and configure this feature, update the agent configuration file as shown in the example below:

    {
      // ...
      "database": {
        "enabled": false,
        "folder": "backup",
        "maxAgeDays": 7,
        "intervalHours": 12
      }
    }