Get Backup Logs is a WordPress ability from BackWPup — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.
Install Free Plugin →Get Backup Logs
Read-onlyRetrieves the content of a backup log file for troubleshooting.
Requires the BackWPup plugin on WordPress 6.9+ (each ability is guarded by a function_exists( 'wp_register_ability' ) check, so nothing registers on older cores). Individual abilities also require specific capabilities: 'backwpup' for listing jobs, reading backup history, reading the documentation resource; 'backwpup_jobs_start' for running or cancelling a backup job; and 'backwpup_logs' for reading backup logs.
What it does
This ability reads a BackWPup log file and returns its content along with metadata (job name, job ID, timestamp, error/warning counts, runtime, and truncation info). It resolves which log to read using a priority order: an explicit backup_id (queried from the backups database), a backup_file filename, a job_id (latest log for that job), or, if none are supplied, the most recent log overall. It transparently reads gzip-compressed log files and caps output at a configurable number of lines (default 200, max 1000). If no matching log is found it returns a WP_Error suggesting the caller check backwpup_get_backup_history first.
See it in action
You ask your AI assistant
"Show me the log for the most recent backup and tell me if there were any errors."
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| backup_id | integer | No | Backup ID from backup history (most specific way to identify a log). |
| backup_file | string | No | Backup filename, e.g. 'backwpup_1_2024-04-23_10-30-00_ABC123.zip'. |
| job_id | integer | No | Job ID — returns the latest log from this job. |
| lines | integer | No | Number of log lines to return. Defaults to 200, capped at 1000. |
Returns
An object with a success boolean, log_content (plain text), and metadata (backup_file, job_name, job_id, timestamp, errors count, warnings count, runtime, total_lines, returned_lines, and truncated flag).
Permission
The current user must have the 'backwpup_logs' capability; unauthorized calls fire a backwpup_mcp_permission_denied action and are denied.
More BackWPup abilities
BackWPup Documentation Overview
Returns Markdown documentation describing the BackWPup MCP server's tools and recommended workflows.
Cancel Running Backup Job
Aborts a currently running BackWPup backup job.
Get Backup History
Returns recent backup history and whether a backup job is currently running.
List Backup Jobs
Lists all configured BackWPup backup jobs with their destinations and schedules.
Run Backup Job
Triggers an immediate backup, either a specific configured job or the default 'Backup Now'.