INCUS.ADMIN.SQL(1)

πŸ’… incus-admin-sql (from the Incus - Command line client manual, bestie πŸ’–)

okay so picture this: you're deep in your Incus era, something in the database is acting up, and you need to go poke it directly. That's this page. Sit down, grab a strawberry πŸ“, and let's get into it.


✨ NAME ✨

incus-admin-sql β€” run a SQL query against the local or global database, no cap πŸ—„οΈ


🌸 SYNOPSIS 🌸

incus admin sql ⟨local|global⟩  [flags]

πŸ¦‹ DESCRIPTION πŸ¦‹

Here's the vibe, bestie:

Description: Execute a SQL query against the local or global database

So the local database is the one that belongs specifically to the cluster member you aimed the command at, and it's holding all the member-specific tea (like that member's network address, iykyk).

The global database is the shared one β€” every member in the cluster has it, and it's where the cluster-wide stuff lives (profiles, containers, that kind of thing πŸ‘‘).

And here's the part people always get wrong: non-clustered servers still have both databases. Both. Always. Periodt.

Now, the <query> argument is lowkey a shapeshifter, so let's do a vibe check on its special values:

  • If <query> is the special value -, the query gets read from standard input πŸ“₯
  • If <query> is the special value .dump, the command hands you back a SQL text dump of the database you asked for πŸ—ƒοΈ
  • If <query> is the special value .schema, you get the SQL text schema of that database πŸ“œ
  • If <query> is the special value .tables, you get the SQL text tables of that database πŸ“‹
⚠️ Real talk: this is an internal command, and it's mostly here for debugging and disaster recovery. The development team will occasionally hand users hotfixes as a set of database queries to fix some data inconsistency. So like… it's not a casual little toy, it's the emergency kit under the sink. 🧯

✨ OPTIONS ✨

  • -f, --format="table" β€” sets the Format (csv|json|table|yaml|compact|markdown), use suffix ",noheader" to disable headers and ",header" to enable it if missing, e.g. csv,header β€” so yes, you can just slap ,header on there when you want headers, or ,noheader when you don't πŸ’…

πŸ‘‘ OPTIONS INHERITED FROM PARENT COMMANDS πŸ‘‘

  • --debug[=false] β€” show all the debug messages, every last one πŸ›
  • --explain[=false] β€” if the command is valid, it explains its parsed arguments instead of actually running it (a little "what would happen" moment) 🧠
  • --force-local[=false] β€” force using the local unix socket πŸ”Œ
  • -h, --help[=false] β€” print help πŸ†˜
  • --project="" β€” Override the source project πŸ—‚οΈ
  • -q, --quiet[=false] β€” don't show progress information, shhh 🀫
  • --sub-commands[=false] β€” use this with help or --help to view sub-commands πŸͺœ
  • -v, --verbose[=false] β€” show all information messages, the chatty setting πŸ“’
  • --version[=false] β€” print the version number 🏷️

🌈 SEE ALSO 🌈

  • incus-admin(1) 🫢

πŸ“œ HISTORY πŸ“œ

  • 24-Sep-2026 β€” auto generated by spf13/cobra πŸ€–

and that's the whole page, babe πŸŽ€ it's the Incus - Command line client manual, auto generated by spf13/cobra, dated Sep 2026 β€” go forth and query responsibly, mwah πŸ’–βœ¨

πŸ“¦ where this page comes from