> ## Documentation Index
> Fetch the complete documentation index at: https://developer.avenvault.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Database and Config Sync Methods in AeroDesk

> Check the active database connection, retrieve host details, and sync config changes in AeroDesk using getBotConfig(), saveConfig(), and reloadConfig().

Manage the active database connection and synchronize configuration changes across your system instantly. This page covers how to inspect the current database settings and persist or refresh configuration data using the AeroDesk API.

<Note>
  Remember to call `saveConfig()` after making direct modifications via the API. Without saving, your changes may be lost when the bot restarts.
</Note>

## Check Active Database

Use the following call to determine which database backend is currently active. The method returns a string such as `"MySQL"`, `"SQLite"`, or `"MongoDB"`.

```java theme={null}
String activeDb = getApi().getBotConfig().database.activeDatabase;
```

## Retrieve Database Host

To inspect the configured database host, access the `host` field on the database configuration object.

```java theme={null}
String dbHost = getApi().getBotConfig().database.host;
```

## Save Config Changes

After editing configuration values through the API, call `saveConfig()` to write the updated state back to the database or YAML file.

```java theme={null}
getApi().saveConfig();
```

## Reload Config

If external changes have been made to the database or configuration store, force the bot to pull fresh data by reloading the config.

```java theme={null}
getApi().reloadConfig();
```


## Related topics

- [AeroDesk Developer API](/index.md)
- [AeroDesk Base API: Extend AeroDeskAddon](/base-api.md)
