← 返回命令列表

Linux command

stolonctl 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Get cluster status

stolonctl --cluster-name [cluster] status

Initialize cluster

stolonctl --cluster-name [cluster] init

Get cluster spec

stolonctl --cluster-name [cluster] spec

Update spec

stolonctl --cluster-name [cluster] update --patch '[{"key":"value"}]'

Failkeeper

stolonctl --cluster-name [cluster] failkeeper [keeper-id]

说明

stolonctl is the command-line management interface for Stolon, a cloud-native PostgreSQL high-availability manager. It provides administrative control over Stolon clusters, including viewing cluster status, initializing new clusters, updating configuration specifications, and triggering manual failovers. The tool communicates with Stolon's store backend (typically etcd or Consul) to read and modify cluster state. The cluster specification defines replication settings, synchronous replication policies, automatic failover behavior, and PostgreSQL configuration parameters. Changes applied through stolonctl are picked up by the Stolon components (sentinels, keepers, and proxies) running in the cluster. Stolonctl is essential for day-to-day operations such as inspecting which keeper is the current master, forcing a failover to a different keeper, and adjusting cluster parameters without downtime. It is commonly deployed alongside Kubernetes-based Stolon installations but also works with standalone deployments.

参数

--cluster-name _NAME_
Cluster name.
status
Show status.
init
Initialize cluster.
spec
Show specification.
update
Update configuration.
--store-backend _TYPE_
Backend type.

FAQ

What is the stolonctl command used for?

stolonctl is the command-line management interface for Stolon, a cloud-native PostgreSQL high-availability manager. It provides administrative control over Stolon clusters, including viewing cluster status, initializing new clusters, updating configuration specifications, and triggering manual failovers. The tool communicates with Stolon's store backend (typically etcd or Consul) to read and modify cluster state. The cluster specification defines replication settings, synchronous replication policies, automatic failover behavior, and PostgreSQL configuration parameters. Changes applied through stolonctl are picked up by the Stolon components (sentinels, keepers, and proxies) running in the cluster. Stolonctl is essential for day-to-day operations such as inspecting which keeper is the current master, forcing a failover to a different keeper, and adjusting cluster parameters without downtime. It is commonly deployed alongside Kubernetes-based Stolon installations but also works with standalone deployments.

How do I run a basic stolonctl example?

Run `stolonctl --cluster-name [cluster] status` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --cluster-name _NAME_ do in stolonctl?

Cluster name.