Skip to main content
Glama

ssh_backup_list

List available backups on remote servers to manage database and file recovery options, filtering by backup type and specifying directories.

Instructions

List available backups on remote server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serverYesServer name
typeNoFilter by backup type
backupDirNoBackup directory (default: /var/backups/ssh-manager)

Implementation Reference

  • The 'ssh_backup_list' tool is listed/registered in the backup tool group within the central tool registry.
    backup: [ 'ssh_backup_create', 'ssh_backup_list', 'ssh_backup_restore', 'ssh_backup_schedule' ],
  • Generates the shell command to list backups by finding and cat-ing metadata files on the remote server.
    export function buildListBackupsCommand(backupDir = DEFAULT_BACKUP_DIR, type = null) { let command = `find "${backupDir}" -name "*.meta.json" -type f`; if (type) { command += ` | grep "${type}_"`; } // Read and parse each metadata file command += ' | while read -r file; do cat "$file"; echo "---"; done'; return command; }
  • Parses the output from the list backups command into structured backup metadata array, sorted by creation date.
    export function parseBackupsList(output) { if (!output || !output.trim()) { return []; } const backups = []; const metadataBlocks = output.split('---').filter(b => b.trim()); for (const block of metadataBlocks) { try { const metadata = JSON.parse(block.trim()); backups.push(metadata); } catch (error) { logger.warn('Failed to parse backup metadata', { error: error.message, block }); } } // Sort by created_at descending return backups.sort((a, b) => new Date(b.created_at) - new Date(a.created_at)); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bvisible/mcp-ssh-manager'

If you have feedback or need assistance with the MCP directory API, please join our Discord server