Archived
5.4 KiB
5.4 KiB
Configuration
backup-mcp loads its configuration from ~/.backup-mcp.json (or the path set in BACKUP_MCP_CONFIG environment variable).
Config File Location
| Method | Path |
|---|---|
| Default | ~/.backup-mcp.json |
| Environment variable | BACKUP_MCP_CONFIG=/path/to/config.json |
Config File Structure
{
"defaultTarget": "dolibarr-db",
"targets": {
"dolibarr-db": {
"name": "dolibarr",
"type": "mysql",
"sshHost": "crm.mokoconsulting.tech",
"sshUser": "mokoconsulting",
"sshKeyPath": "~/.ssh/id_ed25519",
"database": "dolibarr",
"dbUser": "dolibarr",
"dbPassword": "your-db-password",
"localBackupDir": "~/backups/dolibarr"
},
"joomla-db": {
"name": "joomla",
"type": "mysql",
"sshHost": "waas.mokoconsulting.tech",
"sshUser": "mokoconsulting",
"sshKeyPath": "~/.ssh/id_ed25519",
"database": "joomla",
"dbUser": "joomla",
"dbPassword": "your-db-password",
"remotePaths": ["/var/www/html/images", "/var/www/html/media"],
"localBackupDir": "~/backups/joomla"
},
"joomla-akeeba": {
"name": "joomla-akeeba",
"type": "akeeba",
"siteUrl": "https://example.com",
"secretWord": "your-joomla-api-token",
"profileId": 1,
"localBackupDir": "~/backups/joomla-akeeba"
}
}
}
Top-Level Fields
| Field | Type | Required | Description |
|---|---|---|---|
targets |
Record<string, BackupTarget> |
Yes | Named backup target definitions |
defaultTarget |
string |
No | Default target name. Falls back to the first key in targets |
Target Types
Each target has a type field that determines which backup operations are available.
| Type | Tools Available | Description |
|---|---|---|
mysql |
backup_database, backup_files |
MySQL database dump via SSH |
postgres |
backup_database, backup_files |
PostgreSQL database dump via SSH |
files |
backup_files |
Remote file/directory backup via SSH |
akeeba |
akeeba_backup, akeeba_list, akeeba_download, akeeba_delete, akeeba_profiles |
Akeeba Backup via Joomla API |
Common Target Fields
These fields apply to all target types.
| Field | Type | Required | Description |
|---|---|---|---|
name |
string |
Yes | Identifier used in backup filenames (e.g. dolibarr, joomla) |
type |
enum |
Yes | Target type: mysql, postgres, files, akeeba |
localBackupDir |
string |
Yes | Local directory where backups are stored. Created automatically if it does not exist |
SSH Target Fields (mysql, postgres, files)
These fields configure the SSH connection for database and file backups.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
sshHost |
string |
Yes | — | Remote server hostname or IP |
sshPort |
number |
No | 22 |
SSH port |
sshUser |
string |
Yes | — | SSH username |
sshKeyPath |
string |
No | — | Path to SSH private key |
Database Fields (mysql, postgres)
| Field | Type | Required | Description |
|---|---|---|---|
database |
string |
Yes | Database name to dump |
dbUser |
string |
Yes | Database username |
dbPassword |
string |
Yes | Database password |
File Backup Fields
| Field | Type | Required | Description |
|---|---|---|---|
remotePaths |
string[] |
No | Array of remote directories to include in tar.gz backup |
Akeeba Target Fields
These fields configure Akeeba Backup via the Joomla Web Services API.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
siteUrl |
string |
Yes | — | Joomla site base URL (e.g. https://example.com) |
secretWord |
string |
Yes | — | Joomla API token (used as Bearer auth) |
profileId |
number |
No | 1 |
Akeeba backup profile ID |
Backup File Naming
Backups are saved with timestamped filenames:
| Type | Pattern | Example |
|---|---|---|
| Database | {name}-db-{timestamp}.sql.gz |
dolibarr-db-2026-05-09T12-00-00.sql.gz |
| Files | {name}-files-{timestamp}.tar.gz |
joomla-files-2026-05-09T12-00-00.tar.gz |
| Akeeba | {name}-akeeba-{id}-{timestamp}.jpa |
joomla-akeeba-42-2026-05-09T12-00-00.jpa |
Minimal Config Examples
MySQL database backup only
{
"targets": {
"mydb": {
"name": "mydb",
"type": "mysql",
"sshHost": "server.example.com",
"sshUser": "deploy",
"database": "myapp",
"dbUser": "root",
"dbPassword": "secret",
"localBackupDir": "~/backups/mydb"
}
}
}
Akeeba backup only
{
"targets": {
"mysite": {
"name": "mysite",
"type": "akeeba",
"siteUrl": "https://example.com",
"secretWord": "your-joomla-api-token",
"localBackupDir": "~/backups/mysite"
}
}
}
Built on MokoStandards
Repo: backup-mcp · MokoStandards
| Revision | Date | Author | Description |
|---|---|---|---|
| 1.0 | 2026-05-09 | Moko Consulting | Initial version |