ssh_backup_restore
Restores a backup identified by ID, overwriting target databases or files. Supports PostgreSQL, MySQL, MongoDB, and files with pre/post execution hooks.
Instructions
Restores a previously created backup identified by backupId, reading its metadata to pick the engine. This is destructive and overwrites the target: PostgreSQL runs pg_restore with --clean --if-exists which DROPs existing objects, MongoDB runs mongorestore --drop, and MySQL pipes the dump into the live database replacing matching objects. Supports mysql, postgresql, mongodb, and files. Runs pre-restore and post-restore hooks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| server | Yes | Server name | |
| backupId | Yes | Backup ID to restore | |
| database | No | Target database name (for db restores) | |
| dbUser | No | Database user | |
| dbPassword | No | Database password | |
| dbHost | No | Database host (default: localhost) | |
| dbPort | No | Database port | |
| targetPath | No | Target path for files restore (default: /) | |
| backupDir | No | Backup directory (default: /var/backups/ssh-manager) |