{"id":31117,"date":"2022-09-04T12:34:18","date_gmt":"2022-09-04T12:34:18","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=31117"},"modified":"2022-12-23T05:47:33","modified_gmt":"2022-12-23T05:47:33","slug":"gitlab-tutorials-gitlab-ctl-commands-reference-example","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/gitlab-tutorials-gitlab-ctl-commands-reference-example\/","title":{"rendered":"GitLab Tutorials: gitlab-ctl commands reference &#038; example"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">omnibus-ctl: command (subcommand)<\/h2>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><tbody><tr><td>check-config<\/td><td>Check if there are any configuration in gitlab.rb that is removed in specified version<\/td><\/tr><tr><td>deploy-page<\/td><td>Put up the deploy page<\/td><\/tr><tr><td>diff-config<\/td><td>Compare the user configuration with package available configuration<\/td><\/tr><tr><td>get-redis-master<\/td><td>Get connection details to Redis master<\/td><\/tr><tr><td>remove-accounts<\/td><td>Delete <em>all<\/em> users and groups used by this package<\/td><\/tr><tr><td>reset-grafana<\/td><td>Reset Grafana instance to its initial state by removing the data directory<\/td><\/tr><tr><td>set-grafana-password<\/td><td>Reset admin password for Grafana<\/td><\/tr><tr><td>upgrade<\/td><td>Run migrations after a package upgrade<\/td><\/tr><tr><td>upgrade-check<\/td><td>Check if the upgrade is acceptable<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">General Commands:<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>cleanse<\/td><td>Delete <em>all<\/em> gitlab data, and start from scratch.<\/td><\/tr><tr><td>help<\/td><td>Print this help message.<\/td><\/tr><tr><td>reconfigure<\/td><td>Reconfigure the application.<\/td><\/tr><tr><td>show-config<\/td><td>Show the configuration that would be generated by reconfigure.<\/td><\/tr><tr><td>uninstall<\/td><td>Kill all processes and uninstall the process supervisor (data will be preserved).<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Service Management Commands:<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>graceful-kill<\/td><td>Attempt a graceful stop, then SIGKILL the entire process group.<\/td><\/tr><tr><td>hup<\/td><td>Send the services a HUP.<\/td><\/tr><tr><td>int<\/td><td>Send the services an INT.<\/td><\/tr><tr><td>kill<\/td><td>Send the services a KILL.<\/td><\/tr><tr><td>once<\/td><td>Start the services if they are down. Do not restart them if they stop.<\/td><\/tr><tr><td>restart<\/td><td>Stop the services if they are running, then start them again.<\/td><\/tr><tr><td>service-list<\/td><td>List all the services (enabled services appear with a *.)<\/td><\/tr><tr><td>start<\/td><td>Start services if they are down, and restart them if they stop.<\/td><\/tr><tr><td>status<\/td><td>Show the status of all the services.<\/td><\/tr><tr><td>stop<\/td><td>Stop the services, and do not restart them.<\/td><\/tr><tr><td>tail<\/td><td>Watch the service logs of all enabled services.<\/td><\/tr><tr><td>term<\/td><td>Send the services a TERM.<\/td><\/tr><tr><td>usr1<\/td><td>Send the services a USR1.<\/td><\/tr><tr><td>usr2<\/td><td>Send the services a USR2.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Backup Commands:<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>backup-etc<\/td><td>Backup GitLab configuration [options]<\/td><\/tr><tr><td><\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Let&#8217;s Encrypt Commands:<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>renew-le-certs<\/td><td>Renew the existing Let&#8217;s Encrypt certificates<\/td><\/tr><tr><td><\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Database Commands:<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>get-postgresql-primary<\/td><td>Get connection details to the PostgreSQL primary<\/td><\/tr><tr><td>patroni<\/td><td>Interact with Patroni<\/td><\/tr><tr><td>pg-password-md5<\/td><td>Generate MD5 Hash of user password in PostgreSQL format<\/td><\/tr><tr><td>pg-upgrade<\/td><td>Upgrade the PostgreSQL DB to the latest supported version<\/td><\/tr><tr><td>revert-pg-upgrade<\/td><td>Run this to revert to the previous version of the database<\/td><\/tr><tr><td>set-replication-password<\/td><td>Set database replication password<\/td><\/tr><tr><td>write-pgpass<\/td><td>Write a pgpass file for the specified user<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Gitaly Commands:<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>praefect<\/td><td>Interact with Gitaly cluster<\/td><\/tr><tr><td><\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Container Registry Commands:<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>registry-garbage-collect<\/td><td>Run Container Registry garbage collection<\/td><\/tr><tr><td><\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Consul Commands:<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>consul<\/td><td>Interact with the gitlab-consul cluster<\/td><\/tr><tr><td><\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Gitlab Geo Commands:<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>geo<\/td><td>Interact with Geo<\/td><\/tr><tr><td>geo-replication-pause<\/td><td>Replication Process<\/td><\/tr><tr><td>geo-replication-resume<\/td><td>Replication Process<\/td><\/tr><tr><td>promotion-preflight-checks<\/td><td>Run preflight checks for promotion to primary node<\/td><\/tr><tr><td>replicate-geo-database<\/td><td>Replicate Geo database<\/td><\/tr><tr><td>set-geo-primary-node<\/td><td>Make this node the Geo primary<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Pgbouncer Commands:<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>pgb-console<\/td><td>Connect to the pgbouncer console<\/td><\/tr><tr><td>pgb-kill<\/td><td>Send the &#8220;resume&#8221; command to pgbouncer<\/td><\/tr><tr><td>pgb-notify<\/td><td>Notify pgbouncer of an update to its database<\/td><\/tr><tr><td>pgb-resume<\/td><td>Send the &#8220;resume&#8221; command to pgbouncer<\/td><\/tr><tr><td>pgb-suspend<\/td><td>Send the &#8220;suspend&#8221; command to pgbouncer<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>omnibus-ctl: command (subcommand) check-config Check if there are any configuration in gitlab.rb that is removed in specified version deploy-page Put up the deploy page diff-config Compare the user configuration with package available configuration get-redis-master Get connection details to Redis master remove-accounts Delete all users and groups used by this package reset-grafana Reset Grafana instance to&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[2],"tags":[],"class_list":["post-31117","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/31117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=31117"}],"version-history":[{"count":3,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/31117\/revisions"}],"predecessor-version":[{"id":31120,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/31117\/revisions\/31120"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=31117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=31117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=31117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}