Showing entries 1 to 10 of 49
10 Older Entries »
Displaying posts with tag: Automation (reset)
MySQL PITR The Fastest Way With DevOps

Point In Time Recovery - is a nightmare for DBAs if the MySQL clusters are self managed. It was 10PM, after had my dinner I was simply watching some shows in YouTube. And my phone was ringing, the customer on other side. Due to some bad queries, one of the main table get updated without where clause. Then suddenly everyone joined the call and asking me to bring the data back. That day it took 6 to 8 Hours to bring the data. Yes, every DBAs will do one or two biggest mistakes. In my carrier I would say this was that day. So here is my MySQL PITR the fastest way with DevOps.

Where I failed in this DR setup?

  • PITR starts with last full backup + binlogs
  • I missed in my backup script to add --master-data, So I don’t know how to start applying binlogs.
  • No Delay replica. I got the call within 10mins when the data has been messed up. But all of my replicas are real time sync. Its affected all of …
[Read more]
MySQL With DevOps 1 – Automate Database Archive

This is my next blog series. Im going to write about how I automated many complex tasks in MySQL with Rundeck. In my last series, I have explained RunDeck basics. You can find those articles here. In this blog Im writing about how I automated MySQL archive for multiple tables in one Rundeck job. Challeange …

The post MySQL With DevOps 1 – Automate Database Archive appeared first on SQLgossip.

MySQL With DevOps 1 - Automate Database Archive

This is my next blog series. Im going to write about how I automated many complex tasks in MySQL with Rundeck. In my last series, I have explained RunDeck basics. You can find those articles here. In this blog Im writing about how I automated MySQL archive for multiple tables in one Rundeck job.

Challeange with Replication:

My MySQL database setup has 1 Master 4 Read Replica and the 3’rd replica is an intermediate Master for Replica 4. I don’t want to archive this data on Replica 3 and 4. Because these replicas are using for generating historical reports also some internal application.

Disable Log-Bin:

To prevent archive data on Replica 3 and 4, I decided to disable binlog on my archive session. But another challenge is, it won’t replicate to Replica 1 and 2. So my final solution is Archive the data on Master, then execute the …

[Read more]
Configuring efficient MySQL Logrotate

I am a Junior DBA at Mydbops. This is my first blog professionally, I would like to brief my encounter with Log-rotate in first few weeks of my work,  Hope it will help other beginners as well. This Blog will cover the following sections.

  • Introduction to Log-rotate

  • Issues Faced

  • Solutions (Fix for the above issues)

  • Best practices

    • How to configure the Log-rotate

    • Operation of Log-rotate

    • Files responsible for the Log_rotate utility.

1.0. Introduction to Log-rotate:

  • Log-rotate is a utility and …

[Read more]
Automate MySQL 8.0 Installation with Ansible

Introduction :

Ansible is an open-source IT automation engine which can remove drudgery from your work life, and will also dramatically improve the scalability, consistency, and reliability of your IT environment.

Nowadays without automation to manage the Databases is very tricky. We are using Ansible as an infra automation tool to install, configure and manage DB infra at Mydbops.

For example, you have 10 Linux server’s which needs MySQL latest version 8.0 to be installed. Anyone can install MySQL using yum or apt-get. But the manual installation is a time-consuming process.

In this blog, I am going to describe the installation of MySQL 8.0 using Ansible.

Ansible Architecture :

Host …

[Read more]
RunDeck Series 5 – Encrypt Key Files And Passwords In RunDeck

While managing multi servers in a single place, we need a secure authentication method which includes SSH Keys, Passwords and etc. RunDeck is having a great feature called Key Storage. RunDeck Key Storage is a secure and encrypted place for storing confidential contents. Its using HashiCorp Vault for this. Its already enabled by default. So …

The post RunDeck Series 5 – Encrypt Key Files And Passwords In RunDeck appeared first on SQLgossip.

RunDeck Series 5 - Encrypt Key Files And Passwords In RunDeck

While managing multi servers in a single place, we need a secure authentication method which includes SSH Keys, Passwords and etc. RunDeck is having a great feature called Key Storage. RunDeck Key Storage is a secure and encrypted place for storing confidential contents. Its using HashiCorp Vault for this. Its already enabled by default. So we just upload our keys and creating encrypted passwords.

Encrypting PEM Files:

  • Click the Gear Icon and Go to Key Storage.
  • Then you can select that you want to store Key files or Password.

  • Key Type: Public Key
  • Then you can upload your Public Key file or just copy the file contents and paste it.
  • Storage path: Keys/ is the default storage location for all encrypted files. But we can make folders inside the keys/. (Eg: …
[Read more]
RunDeck Series 2 - Add Nodes to the Rundeck

Add nodes to the Rundeck Server is very next step after installation. Here we are going to see adding Linux nodes to Rundeck. After Rudeck 3.0+ the resources.xml file will not create automatically. In previous versions, this file was automatically created while creating a project. We’ll node nodes details in this file. But in latest versions, it’s not creating automatically.

Option#1 Creating resources.xml manually

In this approach, we’ll add all the nodes in a file called resources.xml. Once you created a project follow the below steps.
Job Name: Test-Job
Add the below lines in project.properties file.

#Replace Test-Job with your job name

resources.source.1.config.file=/var/rundeck/projects/Test-Job/etc/resources.xml
resources.source.1.config.generateFileAutomatically=true
resources.source.1.config.includeServerNode=true
resources.source.1.type=file

[Read more]
Migrate MySQL data to RDS/Aurora Using Xtrabackup

In this blog, I will provide a step by step procedure to migrate from on-premise MySQL to Amazon RDS/Aurora using Percona-xtrabackup

Both RDS and Aurora is a DBAAS provided by Amazon. To know more on DBAAS you can view our presentation here.

When you are having a database in size of few GB, it would be very convenient to take a logical backup using a logical backup tool such as Mysqldump or Mydumper and restore it Amazon RDS/Aurora easily. But this is not the case when you are having a data size of a few hundred GB or TB, Where the logical backup and restore is very painful and time-consuming. To overcome this we can use …

[Read more]
MySQL Partition Manager (Yahoo!) in a nutshell

Partitioning is a way of splitting the actual data down into separate .ibd files (data compartments) in the file system based on the defined ranges using the partitioning key. It can help us with maintaining the enormous amount of data in different partitions without much hassle.

In this blog post, we are going to see how to manage table partitioning using yahoo partition manager.

Needs for partitioning:

  • Enhanced data retrieval ( reduced IO ) with smaller B+Tree.
  • Easy Archival or Purge by dropping or truncate  of partition
  • Lesser fragmentation, hence avoiding frequent table optimization.

Partitions management activity like adding/Dropping partition is made easy and automated by …

[Read more]
Showing entries 1 to 10 of 49
10 Older Entries »