restore-diff
Run one database recovery step on a chosen engine, with backup restore, file relocation, point-in-time recovery, overwrite checks, and dry-run planning.
Instructions
dbabrain common.cli restore-diff: One restore step on one engine.
Changes or removes something. A command on the emergency-operations list takes confirm: "yes" and a reason in its request, as on the command line.
Request fields (pass them as request):
db_type (required): The engine.
target: The instance - an input_remote_target.
sqlcmd: SQL Server: run the step with sqlcmd where the server is instead of a driver from here - the run-sqlcmd request less its sql (instance, sqlcmd_path, username, password, timeouts, via, host). One file per call; the ans...
backup_path: The backup.
backup_paths: Several, in order.
database_name: One database.
move: SQL Server: file moves.
move_files: SQL Server full: {data, log} - where the two files go; the logical names are read on the server (RESTORE FILELISTONLY), and the database goes SINGLE_USER first.
relocate: SQL Server full onto another server: every file RESTORE FILELISTONLY names goes to the target's default data / log folder - or data_dir / log_dir - as _; {} for both defaults; the database goes SI...
replace: SQL Server: WITH REPLACE.
overwrite_existing: Whether the step may replace what the target holds; without true it stops first (0.26.0, G2.10; every engine and any state since 0.39.0). SQL Server full: a database of that name in any state raises before the batch t...
stats: SQL Server: progress every n percent.
with_recovery: Bring it online after.
stopat: A point in time.
host: Oracle / PostgreSQL: the host.
backup_location: Oracle: where the pieces are.
encryption_password: Oracle: the backup's password.
mode: Oracle: the RMAN mode.
oracle_sid: Oracle: the SID.
bin_dir: PostgreSQL: the binaries.
data_dir: PostgreSQL: the data directory.
run_as: PostgreSQL: the OS user.
staging_dir: PostgreSQL: where pieces are staged.
wal_dir: PostgreSQL: the WAL archive.
dry_run: Plan only: change nothing.
timeout_seconds: How long to wait.
recovery_timeout_seconds: PostgreSQL into a container, with wal_dir: how long to wait for recovery to end (default 1800). A container that stops or restarts ends the wait at once.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "restore-diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |