Rabu, 17 Juli 2024

POSTGRES-elephen shed backup

 https://elephant-shed.io/doc/chapter/installation.html

https://elephant-shed.io/project/ubuntu/


2.1.1. Installation on Debian and Ubuntu

# Install tools
sudo apt-get install curl ca-certificates apt-transport-https

# Use official PostgreSQL repo, apt.postgresql.org
echo "deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main" | sudo tee -a /etc/apt/sources.list.d/pgdg.list
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

# Use credativ repo, packages.credativ.com
echo "deb https://packages.credativ.com/public/postgresql/ buster-stable main" | sudo tee -a /etc/apt/sources.list.d/elephant-shed.list
curl https://packages.credativ.com/public/postgresql/aptly.key | sudo apt-key add -

# Install elephant-shed
sudo apt-get update
sudo apt-get install elephant-shed

# In case of dependency issues regarding omnidb on buster, add backports
echo "deb http://deb.debian.org/debian buster-backports main" | sudo tee -a /etc/apt/sources.list.d/backports.list
sudo apt-get update
sudo apt-get install -t buster-backports python3-django
sudo apt-get install elephant-shed

# Choose desired PostgreSQL versions to install
sudo apt-get install postgresql-10

# Every user in the group "elephant-shed" is allowed to login at the portal
# Add all needed users to this group
sudo adduser <USERNAME> elephant-shed



Portal

The main portal webpage has links to all bundled applications. It also shows the PostgreSQL status, and allows starting/stopping the clusters, backup, and log reports.

Figure: Elephant Shed portal

Cockpit

For managing clusters and services, Cockpit is used.

Figure: Cockpit Cluster Service

Monitoring - Prometheus

Prometheus is a metric based monitoring system for servers and services. It collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts if some condition is observed to be true.

Figure: Prometheus graphing the load

Monitoring - Grafana

Grafana bundles metrics collected by Prometheus and presents them in a dashboard.

Figure: Grafana - PostgreSQL Server Overview

DBA Tool - OmniDB

OmniDB is a management tool for PostgreSQL to help DBAs execute many different tasks. It provides user management, DDL functionality, an interactive SQL shell, and more.

Figure: OmniDB

Backup - pgBackRest

The Elephant Shed comes with a preinstalled backup solution, pgBackRest.

Figure: pgBackRest Backup via Cockpit

Reporting - pgBadger

A pgBadger report is created for each PostgreSQL instance.

Figure: pgBadger overview

Web Terminal - Shell In A Box

Shell In A Box is a convenient web based terminal.

Remote Control - tmate

tmate is a fork of the popular terminal multiplexer tmux, tweaked for instant terminal sharing. It is preconfigured to connect to a relay server and enables the user to share the current terminal with a third party using a secret token.

Figure: tmate


Tidak ada komentar:

Posting Komentar