April 22, 2020
Tips to Automate MySQL,
MariaDB, Postgres & MongoDB
Sebastian Insausti
Presenter
sebastian@severalnines.com
Copyright 2020 Severalnines ABCopyright 2020 Severalnines AB
Who am I?
I have more than 15 years of experience in telecommunications
companies with experience in...
- MySQL Replication, , MySQL Group Replication,
PostgreSQL, Galera Cluster
- Linux OS and Windows Servers
- ModSecurity, Monitoring, Networking, Virtualization
- Ethical Hacking and Security Solutions
- High Availability Environments and DRP Designs
Presenter
Copyright 2020 Severalnines ABCopyright 2020 Severalnines AB
Common DB Operations Tasks
● Deployment
● Monitoring
● Backup Management
● Automatic Failover & Recovery
● User management
● Security
● Ops reports
Demo
● Overview of the most important ClusterControl
features
Agenda
Copyright 2018 Severalnines AB
Copyright 2018 Severalnines AB
Common Tasks
Copyright 2020 Severalnines ABCopyright 2020 Severalnines AB
● Standalone
○ Just one single node
● Replication
○ Master-Slave
○ Master-Master
● Cluster
○ Single-Master
○ Multi-Master
● High Availability
○ Replication or Cluster
○ Load Balancer
○ Floating IP Address
Deployment
Copyright 2020 Severalnines ABCopyright 2020 Severalnines AB
What to Monitor
● Database
○ Queries
○ Sessions
○ Locks
○ IO
○ Replication
● Host
○ CPU
○ Memory
○ Load Average
○ Network
Monitoring
Copyright 2020 Severalnines ABCopyright 2020 Severalnines AB
Alerting
Copyright 2020 Severalnines ABCopyright 2020 Severalnines AB
● Backups:
○ Logical backup: Plain text files with SQL statements.
○ Physical backup: A copy of the datafiles.
● Backup Rotation:
○ Using scripts, external tools or manually rotation.
● Backup Verification:
○ Manually or by scripting.
● Backup External Storage:
○ Manually or by scripting.
● Backup Encryption:
○ Require sysadmin skills.
● PITR:
○ It's restoring the database at any given moment in the past.
Backup Management
Copyright 2020 Severalnines ABCopyright 2020 Severalnines AB
Automatic Failover & Recovery
● Documentation
○ You need to know what to do in case of master failure
● Manual & Automatic Way
○ Manual: E.g. If you need to do it in a maintenance
windows
○ Automatic: In case of master failure, to reduce the
downtime.
○ Both: First automatic, and in case that something went
wrong, run the manual way
Copyright 2020 Severalnines ABCopyright 2020 Severalnines AB
● User
○ Create new users
○ Update existing users
○ Delete users
● Privileges
○ Limit privileges
○ Password requirements
○ Restrict access from an specific host
User Management
Copyright 2020 Severalnines ABCopyright 2020 Severalnines AB
Security
● Upgrades
○ Operating System
○ Database
● Encryption
○ Backups
○ SSL Encryption
Copyright 2020 Severalnines ABCopyright 2020 Severalnines AB
Operational Reports
● What is Happening?
○ Are backups completed?
○ Are upgrade availables?
○ Helps to stay on top of everything
● Historical Information
○ Previous Backups Status
○ Security information
○ Usage
● User-Friendly
○ Graph
○ Color highlighted information
Copyright 2018 Severalnines AB
Copyright 2018 Severalnines AB
Copyright 2018 Severalnines AB
Demo
Copyright 2018 Severalnines AB
Copyright 2018 Severalnines AB
Q & A

SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB

  • 1.
    April 22, 2020 Tipsto Automate MySQL, MariaDB, Postgres & MongoDB Sebastian Insausti Presenter [email protected]
  • 2.
    Copyright 2020 SeveralninesABCopyright 2020 Severalnines AB Who am I? I have more than 15 years of experience in telecommunications companies with experience in... - MySQL Replication, , MySQL Group Replication, PostgreSQL, Galera Cluster - Linux OS and Windows Servers - ModSecurity, Monitoring, Networking, Virtualization - Ethical Hacking and Security Solutions - High Availability Environments and DRP Designs Presenter
  • 3.
    Copyright 2020 SeveralninesABCopyright 2020 Severalnines AB Common DB Operations Tasks ● Deployment ● Monitoring ● Backup Management ● Automatic Failover & Recovery ● User management ● Security ● Ops reports Demo ● Overview of the most important ClusterControl features Agenda
  • 4.
    Copyright 2018 SeveralninesAB Copyright 2018 Severalnines AB Common Tasks
  • 5.
    Copyright 2020 SeveralninesABCopyright 2020 Severalnines AB ● Standalone ○ Just one single node ● Replication ○ Master-Slave ○ Master-Master ● Cluster ○ Single-Master ○ Multi-Master ● High Availability ○ Replication or Cluster ○ Load Balancer ○ Floating IP Address Deployment
  • 6.
    Copyright 2020 SeveralninesABCopyright 2020 Severalnines AB What to Monitor ● Database ○ Queries ○ Sessions ○ Locks ○ IO ○ Replication ● Host ○ CPU ○ Memory ○ Load Average ○ Network Monitoring
  • 7.
    Copyright 2020 SeveralninesABCopyright 2020 Severalnines AB Alerting
  • 8.
    Copyright 2020 SeveralninesABCopyright 2020 Severalnines AB ● Backups: ○ Logical backup: Plain text files with SQL statements. ○ Physical backup: A copy of the datafiles. ● Backup Rotation: ○ Using scripts, external tools or manually rotation. ● Backup Verification: ○ Manually or by scripting. ● Backup External Storage: ○ Manually or by scripting. ● Backup Encryption: ○ Require sysadmin skills. ● PITR: ○ It's restoring the database at any given moment in the past. Backup Management
  • 9.
    Copyright 2020 SeveralninesABCopyright 2020 Severalnines AB Automatic Failover & Recovery ● Documentation ○ You need to know what to do in case of master failure ● Manual & Automatic Way ○ Manual: E.g. If you need to do it in a maintenance windows ○ Automatic: In case of master failure, to reduce the downtime. ○ Both: First automatic, and in case that something went wrong, run the manual way
  • 10.
    Copyright 2020 SeveralninesABCopyright 2020 Severalnines AB ● User ○ Create new users ○ Update existing users ○ Delete users ● Privileges ○ Limit privileges ○ Password requirements ○ Restrict access from an specific host User Management
  • 11.
    Copyright 2020 SeveralninesABCopyright 2020 Severalnines AB Security ● Upgrades ○ Operating System ○ Database ● Encryption ○ Backups ○ SSL Encryption
  • 12.
    Copyright 2020 SeveralninesABCopyright 2020 Severalnines AB Operational Reports ● What is Happening? ○ Are backups completed? ○ Are upgrade availables? ○ Helps to stay on top of everything ● Historical Information ○ Previous Backups Status ○ Security information ○ Usage ● User-Friendly ○ Graph ○ Color highlighted information
  • 13.
  • 14.
    Copyright 2018 SeveralninesAB Copyright 2018 Severalnines AB Demo
  • 15.
    Copyright 2018 SeveralninesAB Copyright 2018 Severalnines AB Q & A