Overview
The Skinny
Tungsten Clustering provides high availability, disaster recovery, and a host of other benefits for MySQL / MariaDB / Percona Server databases. In this blog post we will explore some of the shell aliases I use every day to administer various Tungsten Clusters.
Shell Aliases: A Quick Review
Quick and Easy
A shell alias is simply a way to create a shortcut for frequently-used command sequences.
For example, I like to shorten the command `clear` to `cls`, i.e.
shell> alias cls=clear
shell> cls
If you create an alias on the fly it will be lost when the shell exits.
To save aliases so they are available to all shell sessions, update your shell's profile or rc script.
For example, add the below line to the bottom of `.bashrc`, save and exit:
shell> vi ~/.bashrc
alias cls=clear
shell> source ~/.bashrc
shell> cls
Open a new terminal window and confirm that your new alias works.
Shell Aliases: My Favorites
Speed and Efficiency
The aliases below are grouped together based on the functionality:
alias se='source /opt/continuent/share/env.sh'
alias vini='vi /etc/tungsten/tungsten.ini'
alias auto='echo set policy automatic | cctrl'
alias maint='echo set policy maintenance | cctrl'
alias cdl='cd /opt/continuent/service_logs'
alias cds='cd /opt/continuent/software'
alias cdt='cd /opt/continuent/tungsten'
alias ccls='echo ls | cctrl'
alias cccls='echo ls | cctrl -service global'
alias chb='echo cluster heartbeat | cctrl'
alias toff='trepctl offline'
alias ton='trepctl online'
alias ts='trepctl status'
alias tsg='trepctl status | egrep stat\|appl'
alias tss='trepctl services'
alias tsl='trepctl services | grep serviceName | awk -F: '\''{print $2}'\'''
alias tqv='tpm query version'
alias tvu='tools/tpm validate-update'
alias tup='tools/tpm update -i --replace-release'
You can create your own - the sky is the limit!
Summary
The Wrap-Up
In this blog post we explored some of the shell aliases I use every day to administer various Tungsten Clusters.
To learn about Continuent solutions in general, check out https://www.continuent.com/solutions
The Library
Please read the docs!
For more information about Tungsten Cluster recovery procedures, please visit https://docs.continuent.com/tungsten-clustering-6.0/operations-recovery-master.html
Tungsten Clustering is the most flexible, performant global database layer available today - use it underlying your SaaS offering as a strong base upon which to grow your worldwide business!
For more information, please visit https://www.continuent.com/solutions
Want to learn more or run a POC? Contact us.
Comments
Add new comment