.nh
.TH "Incus - Command line client" "1" "Jan 2025" "Auto generated by spf13/cobra" ""

.SH NAME
.PP
incus-admin-sql - Execute a SQL query against the local or global database


.SH SYNOPSIS
.PP
\fBincus admin sql   [flags]\fP


.SH DESCRIPTION
.PP
Description:
  Execute a SQL query against the local or global database

.EX
The local database is specific to the cluster member you target the
command to, and contains member-specific data (such as the member network
address).

The global database is common to all members in the cluster, and contains
cluster-specific data (such as profiles, containers, etc).

If you are running a non-clustered server, the same applies, as that
instance is effectively a single-member cluster.

If <query> is the special value "-", then the query is read from
standard input.

If <query> is the special value ".dump", the command returns a SQL text
dump of the given database.

If <query> is the special value ".schema", the command returns the SQL
text schema of the given database.

This internal command is mostly useful for debugging and disaster
recovery. The development team will occasionally provide hotfixes to users as a
set of database queries to fix some data inconsistency.
.EE


.SH OPTIONS
.PP
\fB-f\fP, \fB--format\fP="table"
	Format (csv|json|table|yaml|compact)``


.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP
\fB--debug\fP[=false]
	Show all debug messages

.PP
\fB--force-local\fP[=false]
	Force using the local unix socket

.PP
\fB-h\fP, \fB--help\fP[=false]
	Print help

.PP
\fB--project\fP=""
	Override the source project``

.PP
\fB-q\fP, \fB--quiet\fP[=false]
	Don't show progress information

.PP
\fB--sub-commands\fP[=false]
	Use with help or --help to view sub-commands

.PP
\fB-v\fP, \fB--verbose\fP[=false]
	Show all information messages

.PP
\fB--version\fP[=false]
	Print version number


.SH SEE ALSO
.PP
\fBincus-admin(1)\fP


.SH HISTORY
.PP
26-Jan-2025 Auto generated by spf13/cobra
