https://github.com/terminus-plugin-project/terminus-replica-plugin
Replica - A Terminus plugin that exposes database replica connection details.
https://github.com/terminus-plugin-project/terminus-replica-plugin
Last synced: about 1 year ago
JSON representation
Replica - A Terminus plugin that exposes database replica connection details.
- Host: GitHub
- URL: https://github.com/terminus-plugin-project/terminus-replica-plugin
- Owner: terminus-plugin-project
- License: mit
- Created: 2017-03-01T07:47:53.000Z (over 9 years ago)
- Default Branch: 1.x
- Last Pushed: 2022-03-18T18:42:34.000Z (about 4 years ago)
- Last Synced: 2025-02-14T22:53:04.961Z (over 1 year ago)
- Language: PHP
- Size: 6.84 KB
- Stars: 0
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Terminus Plugin: Replica
Replica is a Terminus plugin that decorates the terminus `connection:info`
command with additional connection info related to any database replicas you
may have enabled for your site environments.
## Installation
For installation help, see [Manage Plugins](https://pantheon.io/docs/terminus/plugins/).
```sh
mkdir -p ~/.terminus/plugins
composer create-project -d ~/.terminus/plugins terminus-plugin-project/terminus-replica-plugin:~1
```
## Usage
If you pull connection info for an environment that has an associated slave
database, you will see additional details:
```sh
terminus connection:info .
```
...Which might respond with:
```
----------------------- ---------------------------------------------------------------------------------------------------------------------------------------
SFTP Command sftp -o Port=2222 live.aaaaaaaa-0000-bbbb-1111-cdef2345ghij@appserver.live.aaaaaaaa-0000-bbbb-1111-cdef2345ghij.drush.in
MySQL Command mysql -u pantheon -p12a345b678cd9012efgh345i67890123 -h dbserver.live.aaaaaaaa-0000-bbbb-1111-cdef2345ghij.drush.in -P 10206 pantheon
Redis Command redis-cli -h 13.37.13.37 -p 10000 -a aa1b23456cde789fgh0ij1234k56l7m8
MySQL Replica Command mysql -u pantheon -p01ab234c567d8e90fgh1i23j4kl5678m -h 133.71.33.7 -P 11258 pantheon
----------------------- ---------------------------------------------------------------------------------------------------------------------------------------
```
And, as usual, you can specify the field you want:
```sh
terminus connection:info my-site.live --field=mysql_replica_command
```
...Which might return:
```
mysql -u pantheon -p01ab234c567d8e90fgh1i23j4kl5678m -h 133.71.33.7 -P 11258 pantheon
```