Skip to content

targets verify

Verify database connectivity for a target’s URLs.

clonit targets verify <name>
Argument Description Required
name Name of the target to verify Yes

Tests database connectivity for all configured URLs on the specified target and checks version compatibility between local database tools and remote servers.

The first section tests database connectivity for the source URL, destination URL, and sanitize destination URL (if configured).

Column Description
URL The database URL being tested (masked)
Connection Connection type (src, dst, sanitize-dst)
Status Result: OK or Failed with error message

The command returns an error if any of the connections fail.

The second section displays the versions of local database tools (pg_dump, pg_restore, psql) found in your PATH.

Column Description
Tool Name of the database tool
Version Detected version (e.g., 16.1)
Status Found or Not Found

The third section queries each configured database URL for its server version.

Column Description
URL The database URL (masked)
Server Version PostgreSQL server version
Status OK or error message

If the target database does not exist yet (common for destination databases), the command falls back to querying the postgres maintenance database on the same server to determine the server version.

The final section checks whether local tool versions are compatible with the remote server versions. PostgreSQL requires that the tool major version is greater than or equal to the server major version. For example, pg_restore v15 cannot reliably restore to a PostgreSQL 16 server.

Column Description
Check Tool and URL being compared (e.g., pg_dump vs src_url)
Status compatible, incompatible, unknown, or n/a
Detail Explanation (e.g., “pg_restore 16 >= server 15”)

Status values:

  • compatible – tool major version >= server major version
  • incompatible – tool major version < server major version
  • unknown – server version could not be determined (unreachable or tool not found)
  • n/a – URL not configured on the target

Verify connectivity and version compatibility:

clonit targets verify mydb

Verify with debug output for troubleshooting:

clonit --debug targets verify production-snap