Get your free beta license ↗
API operation · backups group
POST

/backups/remote/test

First published 3 Oct 20260.1.0Unchanged since publication

Test the remote backup destination

Who may call it
AdministratorResellerCustomer
Token scope, any of
backupsall
Answers200 OK

UrbeStack creates its SSH key pair if needed and uses it to connect to backups.remote_host on backups.remote_port as backups.remote_user. It creates backups.remote_path and any missing parent directories, then lists the destination's contents, including backup day folders. The response contains the test result in remote.

On the first connection, UrbeStack records the SSH host key in known_hosts and reports its fingerprint. Future transfers require the recorded key. If the test reports a changed host key, verify the change, run urbestack-backup-remote-key with --forget-host, and test again.

The API returns 400 if backups.remote_host, backups.remote_user or backups.remote_path is unset, and 403 if the caller lacks administrator privileges. It returns 502 if the host key has changed, the host does not respond, the remote account rejects UrbeStack's key, or the remote host lacks rsync. The error includes the SSH failure or installation instructions as applicable. Nightly transfers use rsync on both hosts. Configure the destination through PUT /settings/{key}.

As a command

Run as root on the server

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X POST "$API/backups/remote/test" \
  -H "Authorization: Bearer $TOKEN"
Response · 200 OK
{
  "remote": {
    "days": [
      "text"
    ],
    "entries": 1,
    "fingerprint": "text",
    "free_bytes": 1,
    "host": "text",
    "host_key": {
      "fingerprint": "text",
      "name": "alice",
      "type": "rebuild"
    },
    "path": "public_html/index.php",
    "port": 8443,
    "size_bytes": 1,
    "user": "alice"
  }
}

Errors

3 errors, each a status and a sentence
400Name the remote host, user and path first
401Authentication required
403Insufficient privileges
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/api/post-backups-remote-test/