<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>cli on PIG</title>
    <link>https://pig.pgsty.com/v1.11/tags/cli/</link>
    <description>Recent content in cli on PIG</description>
    <generator>Hugo</generator>
    <language>en</language>
    
    
    
      <lastBuildDate>Sun, 06 Dec 2026 08:44:11 +0800</lastBuildDate>
    
    
      <atom:link href="https://pig.pgsty.com/v1.11/tags/cli/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
        <title>pig pe</title>
        <link>https://pig.pgsty.com/v1.11/pe/</link>
        
        
        
        <guid>https://pig.pgsty.com/v1.11/pe/</guid>
        <description>&lt;p&gt;Use &lt;code&gt;pig pe&lt;/code&gt; to read metrics from a running &lt;a href=&#34;https://github.com/Vonng/pg_exporter&#34;&gt;pg_exporter&lt;/a&gt;&#xA;and reload its configuration. The full command name is &lt;code&gt;pig pg_exporter&lt;/code&gt;.&#xA;Aliases are &lt;code&gt;pe&lt;/code&gt;, &lt;code&gt;pgexp&lt;/code&gt;, and &lt;code&gt;pgexporter&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;div class=&#34;td-code td-code--untitled&#34; id=&#34;td-code-5610e6f0-fence-0&#34; data-td-code data-td-code-auto-id&#xA;     data-td-language=&#34;bash&#34; data-td-line-count=&#34;4&#34;&gt;&#xA;  &lt;div class=&#34;td-code__viewport&#34; id=&#34;td-code-5610e6f0-fence-0-viewport&#34; data-td-code-viewport&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pig pe get                     &lt;span class=&#34;c1&#34;&gt;# Show PostgreSQL metrics&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pig pe list                    &lt;span class=&#34;c1&#34;&gt;# List PostgreSQL metric families&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pig pe stat                    &lt;span class=&#34;c1&#34;&gt;# Show exporter statistics&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pig pe reload                  &lt;span class=&#34;c1&#34;&gt;# Reload exporter configuration&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;select-an-exporter&#34;&gt;Select an exporter&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;The default endpoint is &lt;code&gt;http://127.0.0.1:9630&lt;/code&gt;. Use these options to select another instance:&lt;/p&gt;</description>
      </item>
    <item>
        <title>pig do</title>
        <link>https://pig.pgsty.com/v1.11/do/</link>
        
        
        
        <guid>https://pig.pgsty.com/v1.11/do/</guid>
        <description>&lt;p&gt;&lt;code&gt;pig do&lt;/code&gt; runs administration playbooks from the selected Pigsty directory. It uses the inventory to add clusters, create databases and users, install packages, or remove services.&lt;/p&gt;&#xA;&lt;p&gt;Define the target configuration in the inventory first, then run the corresponding command. The commands invoke Ansible directly. This command group has no general &lt;code&gt;--plan&lt;/code&gt; mode.&lt;/p&gt;&#xA;&lt;div class=&#34;td-code td-code--untitled&#34; id=&#34;td-code-bfd4bcb4-fence-0&#34; data-td-code data-td-code-auto-id&#xA;     data-td-language=&#34;bash&#34; data-td-line-count=&#34;6&#34;&gt;&#xA;  &lt;div class=&#34;td-code__viewport&#34; id=&#34;td-code-bfd4bcb4-fence-0-viewport&#34; data-td-code-viewport&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pig &lt;span class=&#34;k&#34;&gt;do&lt;/span&gt; pgsql-add  pg-test 10.10.10.12     &lt;span class=&#34;c1&#34;&gt;# add one PostgreSQL instance&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pig &lt;span class=&#34;k&#34;&gt;do&lt;/span&gt; pgsql-rm   pg-test 10.10.10.12     &lt;span class=&#34;c1&#34;&gt;# remove one PostgreSQL instance&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pig &lt;span class=&#34;k&#34;&gt;do&lt;/span&gt; pgsql-db   pg-meta app             &lt;span class=&#34;c1&#34;&gt;# create or update a database&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pig &lt;span class=&#34;k&#34;&gt;do&lt;/span&gt; pgsql-user pg-meta dbuser_app      &lt;span class=&#34;c1&#34;&gt;# create or update a user&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pig &lt;span class=&#34;k&#34;&gt;do&lt;/span&gt; node-pkg   pg-meta restic          &lt;span class=&#34;c1&#34;&gt;# install a package on selected nodes&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pig &lt;span class=&#34;k&#34;&gt;do&lt;/span&gt; redis-add  redis-meta              &lt;span class=&#34;c1&#34;&gt;# initialize a Redis cluster&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Inventory selection is shared with &lt;a href=&#34;https://pig.pgsty.com/v1.11/sty/#sty-deploy&#34;&gt;&lt;code&gt;sty deploy&lt;/code&gt;&lt;/a&gt;. PIG passes the resolved&#xA;source to Ansible without interpreting it again relative to Pigsty home. Missing explicit,&#xA;environment, or default sources fail before playbook execution. Existing directory and executable&#xA;Inventory sources remain Ansible inputs; static Inventory commands do not execute them.&lt;/p&gt;</description>
      </item>
    <item>
        <title>pig</title>
        <link>https://pig.pgsty.com/v1.11/cmd/</link>
        
        
        
        <guid>https://pig.pgsty.com/v1.11/cmd/</guid>
        <description>&lt;p&gt;&lt;code&gt;pig&lt;/code&gt; manages PostgreSQL packages, local database services, and Pigsty deployments. Choose a command below for your task. Use &lt;code&gt;pig COMMAND --help&lt;/code&gt; to see the options supported by your installed program.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://pig.pgsty.com/v1.11/repo/&#34;&gt;&lt;strong&gt;pig repo&lt;/strong&gt;&lt;/a&gt;: manage software repositories&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://pig.pgsty.com/v1.11/ext/&#34;&gt;&lt;strong&gt;pig ext&lt;/strong&gt;&lt;/a&gt;: manage PostgreSQL extensions&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://pig.pgsty.com/v1.11/build/&#34;&gt;&lt;strong&gt;pig build&lt;/strong&gt;&lt;/a&gt;: build extensions from source&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;pig install&lt;/strong&gt;: install packages with the native package manager and translate PostgreSQL aliases&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://pig.pgsty.com/v1.11/sty/&#34;&gt;&lt;strong&gt;pig sty&lt;/strong&gt;&lt;/a&gt;: manage Pigsty installation and Grafana dashboards&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://pig.pgsty.com/v1.11/inventory/&#34;&gt;&lt;strong&gt;pig inventory&lt;/strong&gt;&lt;/a&gt;: inspect, edit, validate, and exchange the Pigsty inventory&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://pig.pgsty.com/v1.11/do/&#34;&gt;&lt;strong&gt;pig do&lt;/strong&gt;&lt;/a&gt;: run Pigsty administration playbook tasks&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://pig.pgsty.com/v1.11/pe/&#34;&gt;&lt;strong&gt;pig pe&lt;/strong&gt;&lt;/a&gt;: access pg_exporter metrics and configuration&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://pig.pgsty.com/v1.11/pg/&#34;&gt;&lt;strong&gt;pig pg&lt;/strong&gt;&lt;/a&gt;: manage local PostgreSQL servers&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://pig.pgsty.com/v1.11/pt/&#34;&gt;&lt;strong&gt;pig pt&lt;/strong&gt;&lt;/a&gt;: run patronictl transparently with service and config helpers&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://pig.pgsty.com/v1.11/pb/&#34;&gt;&lt;strong&gt;pig pb&lt;/strong&gt;&lt;/a&gt;: manage pgBackRest backup and restore&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://pig.pgsty.com/v1.11/pitr/&#34;&gt;&lt;strong&gt;pig pitr&lt;/strong&gt;&lt;/a&gt;: run the full PITR workflow&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;pig context&lt;/strong&gt;: output an environment context snapshot for humans and agents&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;pig license&lt;/strong&gt;: issue and verify Pigsty licenses&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;pig status / update / version&lt;/strong&gt;: inspect environment status, upgrade pig, and print version information&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;global-options&#34;&gt;Global options&#xA;&lt;/h2&gt;&#xA;&lt;div class=&#34;td-table-scroll td-table-scroll--static&#34;&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;    &lt;tr&gt;&#xA;      &lt;th scope=&#34;col&#34; style=&#34;text-align: left&#34;&gt;Option&lt;/th&gt;&#xA;      &lt;th scope=&#34;col&#34; style=&#34;text-align: left&#34;&gt;Purpose&lt;/th&gt;&#xA;    &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;    &lt;tr&gt;&#xA;      &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;-h, --help&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;td style=&#34;text-align: left&#34;&gt;Show help&lt;/td&gt;&#xA;    &lt;/tr&gt;&#xA;    &lt;tr&gt;&#xA;      &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;-H, --home PATH&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;td style=&#34;text-align: left&#34;&gt;Select the Pigsty installation directory&lt;/td&gt;&#xA;    &lt;/tr&gt;&#xA;    &lt;tr&gt;&#xA;      &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;-i, --inventory PATH&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;td style=&#34;text-align: left&#34;&gt;Select the inventory&lt;/td&gt;&#xA;    &lt;/tr&gt;&#xA;    &lt;tr&gt;&#xA;      &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;-o, --output FORMAT&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;td style=&#34;text-align: left&#34;&gt;Output format: &lt;code&gt;text&lt;/code&gt; (default), &lt;code&gt;json&lt;/code&gt;, &lt;code&gt;yaml&lt;/code&gt;, or &lt;code&gt;json-pretty&lt;/code&gt;&lt;/td&gt;&#xA;    &lt;/tr&gt;&#xA;    &lt;tr&gt;&#xA;      &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;--debug&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;td style=&#34;text-align: left&#34;&gt;Enable debug logging&lt;/td&gt;&#xA;    &lt;/tr&gt;&#xA;    &lt;tr&gt;&#xA;      &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;--log-level LEVEL&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;td style=&#34;text-align: left&#34;&gt;Log level: &lt;code&gt;debug&lt;/code&gt;, &lt;code&gt;info&lt;/code&gt; (default), &lt;code&gt;warn&lt;/code&gt;, &lt;code&gt;error&lt;/code&gt;, &lt;code&gt;fatal&lt;/code&gt;, or &lt;code&gt;panic&lt;/code&gt;&lt;/td&gt;&#xA;    &lt;/tr&gt;&#xA;    &lt;tr&gt;&#xA;      &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;--log-path PATH&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;td style=&#34;text-align: left&#34;&gt;Write logs to a file; the default is the terminal&lt;/td&gt;&#xA;    &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;PIG-owned results support structured output. Raw-content commands such as &lt;code&gt;inventory show&lt;/code&gt; and passthrough commands such as &lt;code&gt;pt list&lt;/code&gt; retain their native output. See the command reference for details.&lt;/p&gt;</description>
      </item>
    
  </channel>
</rss>
