create_database_backup
Set up automated database backups with configurable frequency and retention. Schedule backups to protect your data.
Instructions
Create a backup configuration for a database
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes | Database UUID | |
| enabled | No | Enable scheduled backups | |
| frequency | No | Backup frequency (e.g., daily, weekly) | |
| retention | No | Number of backups to retain |
Implementation Reference
- src/tools/handlers.ts:438-440 (handler)Handler for create_database_backup tool. Requires 'uuid' parameter, then sends a POST request to /databases/{uuid}/backups with all args as the request body.
case 'create_database_backup': requireParam(args, 'uuid'); return client.post(`/databases/${args.uuid}/backups`, args); - src/tools/definitions.ts:1144-1157 (schema)Input schema definition for create_database_backup. Accepts 'uuid' (required), 'enabled' (boolean, default true), 'frequency' (string, e.g. daily/weekly), and 'retention' (number).
{ name: 'create_database_backup', description: 'Create a backup configuration for a database', inputSchema: { type: 'object', properties: { uuid: { type: 'string', description: 'Database UUID' }, enabled: { type: 'boolean', description: 'Enable scheduled backups', default: true }, frequency: { type: 'string', description: 'Backup frequency (e.g., daily, weekly)' }, retention: { type: 'number', description: 'Number of backups to retain' } }, required: ['uuid'] } }, - src/tools/index.ts:2-2 (registration)Tool handler function handleTool is exported from handlers.ts and used by the MCP server via CallToolRequestSchema handling in index.ts (line 57).
export { handleTool } from './handlers.js'; - src/client.ts:98-101 (helper)The CoolifyClient.post method used by the handler to make the actual POST request to the Coolify API.
async post<T>(endpoint: string, data?: Record<string, unknown>): Promise<T> { const response = await this.client.post<T>(endpoint, data); return response.data; }