War doesn’t make sense Anymore

  • War does not determine who is right – only who is left.  – Bertrand Russell.
  • The more you sweat in peace, the less you bleed in war.  – Norman Schwarzkop.
  • Weakness of attitude becomes weakness of character.  – Albert Einstein.
  • The two most powerful warriors are patience and time.  – Leo Tolstoy
  • The fool who has no sense to discriminate between what is good and what is bad is well nigh as dangerous as the man who does discriminate and yet chooses the bad. – Theodore Roosevelt

Tips VMware – Module MonitorLoop power on failed

During laboratory maintenance operations, suddenly a Virtual Machine was no longer able to start.

The vCENTER console reported an error in initializing the server swap file.

Like any good system engineer, before making any changes to the environment, I tried to back up the aforementioned VM.

The job stopped due to the following error: (” An error occurred while taking a snapshot: Invalid change tracker error code “).

Troubleshooting:

  1. Since the swap file handles memory over-commitment, I tried to change the allocated amount of RAM.
  2. I added space to the Datastore on which the VM resided to make sure VMware had enough space to manage the swap file.
  3. I searched in the configuration file ( vmx ) for differences with respect to the configuration of the other VMs.

All tests and changes made did not solve the problem.

Aware that I would have to change the VM configuration, I implemented a simple strategy to:

  • Backup the VM through the Veeam Agent for Linux (The VAL operates at the Guest-OS level and not at the hypervisor level).
  • Write down all the changes that I would have made to the VMs (editor’s note: I had worn Hop-o’-My-Thumb‘s hat, that is, able to return to the initial configuration in a short time).

The methodical ” change, note, check and turn on” approach allowed me to discover that the problem was related to the CPU configuration of the Virtual Machine.

In fact, by resetting the ” CPU reservation ” values to Zero and ” CPU share” to Normal (see image 1), the problem went away, allowing me to start the VM and back it up.

Sapiens nihil affirmat quod non probet (A wise man says nothing that he cannot prove)

Picture 1

MySQL Backup & Veeam Backup & Replication Parte 2

In questo secondo articolo è illustrato dove ricercare gli script per realizzare backup consistenti di DataBase MySQL con Veeam Backup & Replication.

Per scoprire perché sia necessario utilizzare script, vi raccomando di leggere il precedente articolo.

Hot Backup Database Online Dump (Linux)

L’opzione prevede di integrare negli script il comando mysqldump.

Due esempi sono consultabili al seguente sito:

HotBackup Database Freeze (Linux)

L’opzione prevede di effettuare a caldo il flush delle tabelle.

Due esempi sono consultabili al seguente sito:

Cold Backup Database Shutdown (Linux)

L’opzione prevede di fermare il servizion MySQL prima di realizzare il backup.

Due esempi sono consultabili al seguente sito:

Hot Backup Database Online Dump (Windows)

Il seguente esempio in poweshell è puramente dimostrativo. Il mio consiglio è quello di chiedere al vostro esperto in powershell di crearne uno che rispetti le politiche aziendali di gestione e sicurezza.

Pre command (avvia lo script mySQLdump.ps1 sul server YOURMYSQLSERVER)

$password = ConvertTo-SecureString “YOURPWD” -AsPlainText -Force

$Cred = New-Object System.Management.Automation.PSCredential (“DOMAIN\USER”, $password)

New-PSSession -ComputerName mySQL-WIN -Credential $Cred

#Enter-PSSession -ComputerName YOURMYSQLSERVER

#Invoke-Command -Session 6 -FilePath “C:\Script\script-7.ps1” -ComputerName mySQL-WIN

Invoke-Command -ComputerName mySQL-WIN -Credential $Cred -ScriptBlock { C:\Script\mySQLdump.ps1}

mySQLdump.ps1 (Crea il file .sql che viene memorizzato in una specifica cartella sul server YOURMYSQLSERVER)

# Declare variables

$path = “/backups”                      # path of backup folder

$logFile = “automate-mysqldump.log”     # path of log file

$configFile = “C:\ProgramData\MySQL\MySQL Server 5.6\my.ini”           # path of my.cnf file

# Navigate to the backups folder

Set-Location $path

# get today’s date to name today backup folder

$date = Get-Date -UFormat “%Y-%m-%d”

# Check for log file

# Create if not found

if (-NOT (Test-Path $logFile)) {

    New-Item -Path . -Name $logFile -ItemType “file”

    Add-Content $logFile “Created on: $date`n”

}

# enter directory

# create today’s backup directory if it does not exist

if (-NOT (Test-Path $date)) {

    New-Item -ItemType “directory” $date

    Add-Content $logFile “[$date]: New $date directory is created”

}

# Set-Location $date

Add-Content $logFile “[$date]: Starting mysqldump”

# invoke mysqldump – insert mysqldump statement

mysqldump –defaults-file=$configFile -r $date/database-backup.sql –all-databases

Add-Content $logFile “[$date]: Backup for databases are completed”

Add-Content $logFile “”

# pause

 Post command (chiude la sessione remota)

Remove-PSSession -ComputerName YOURMYSQLSERVER

Nel prossimo articolo sarà illustrato come integrare gli script in Veeam Backup & Replication.

MySQL Backup and Veeam Backup & Replication – Part 1

This article will show you how to implement a data protection strategy in MySQL environments.

Let’s start with a consideration.

To create consistent backups from an application point of view, it is necessary that before the copy process is started, the application has written all the data in memory to disk ( flush ).

For example, Microsoft® applications use a technology called Shadow Copy which, through the coordination of VSS drivers , achieves application consistency.

A similar technology is not available on Linux and in addition MySQL does not support it in the Microsoft® environment.

How to remedy?

Through the creation of scripts that automate application consistency before starting the creation of the Snapshot .

Having understood this aspect, let’s return to the scope of the article, introducing the options available for MySQL .

Note 1 : Application consistency occurs before snapshot creation.

  • 1. Logical Backup : The script creates a file with the .sql extension which in case of restore allows the re-creation of the database and its data.

The file . sql is created through the native MySQL command ” mysqldump “ .

The advantages of logical backup can be summarized in:

  • There are no dependencies on third-party software.
  • Backups can be restored to other servers.
  • 2. Physical / Cold Backup : Cold copies of the DB files are created (for example: ibdata, .ibd, .frm, ib_logfile, my.cnf).

To be sure that the backups are made in ” application consistency ” mode, before taking the snapshot, it is essential to stop the MySQL services.

It is a backup strategy typically implemented in environments that do not require 24×7 operations.

Note 2 : The service is stopped only for the time necessary to create the snapshot and not for the entire duration of the backup.

  • 3. Physical / Hot Backup : If the InnoDB engine is running, the script allows the creation of consistent copies without stopping the services (using for example the command mysqlbackup component of the MySQL Enterprise suite ( MySQL Product) ).

Now that we know the scripting options available, let’s see how Veeam solutions can natively integrate with MySQL environments.

The first available option is the Veeam Agent for Linux ( VAL ) which automates the following four steps:

  1. Flush data from memory to disk (application consistency).
  2. Creation of the snasphot.
  3. Release of tables.
  4. Start the Backup process.

Note 3 : As indicated in the first part of the article, if the DB is of the MyISAM type, it is possible to backup with the blocking of all the tables.

The pre-requisites of the VAL are:

  • MySQL version is greater than or equal to 5.8.
  • The operating system is Linux.

Question: Is it possible to backup in Windows environments where the MySQL version is lower than version 5.8?

The answer is yes and the available scenarios are:

Logical Backup -> Hot-Backup Database Online Dump -> Mysqldump command.

Physical / Cold Backup –> Cold-Backup Database Shutdown -> Temporary stop of the Services.

Physical / Hot Backup –> Hot-Backup Database Freeze -> Native mysql commands.

Note4 : There is also the possibility of making Partial Backups . In this scenario, specific tables and databases are backed up. It is useful when different protection strategies have to be implemented on the same Server.

In the next article, we will find out how to create scripts and how to integrate them into Veeam Backup & Replication.

VMCE 2021 – My experience

On January 24th I completed the VMCE 2021 training course.

In this article, I will describe the methodology I used in order to pass the final exam.

The six cornerstones of the preparation were:

1- Pay maximum attention to Veeam Backup & Replication components (Backup Server, Proxy, Wan Acceleration, Gateway) understanding their purpose, operation, and limitations. For example, for proxies to know the usage scenarios of the different transport modes (SAN, Virtual Appliance, Direct NFS, Network).

2- Understand the RPO (Recovery Point Object) and RTO (Recovery Time Object) theme by analyzing:

    • Type and topology of protection (Backup, Replica, and Backup Copy Job)
    • Type of repositories involved (Stand-alone, XFS / ReFS, Immutable, SOBR, capacity Tier and Archive Tier)
    • Backup chain (Forever Forward Incremental, Reversed Incremental and Forward Incremental)

Note 1 : to verify the preparation the advice is to respond to imaginary requests for protection; for example, thegable.it customer requested a daily primary backup of their VMs with an RPO of 31 days, with a GFS retention of 8 Weeks and 12 Months. In addition, the backup data will have to be copied to a second site …

3- Reinforce the knowledge on the available recovery options (VBR manual), through the Veeam Explorer, also in this case paying particular attention to the usage scenarios and limitations.

4- Massively use the laboratory to establish not only theoretical aspects but also real implementation scenarios.

5- Know the Veeam ONE features (Infrastructure, Data Protection, Business View).

Note 2: Laboratories simplify learning by often turning theory into a wonderful game of trial and error.

Preparation time was 42 days roughly divided into 2 hours/day on average during the week and 4 hours/day on average on weekends.

6- To check your progress and for the final review, the following are available:

VMCE 2021 Practice Exam

Concluding note:

Pearson-Vue test platform certifies VMCE-2021 competency.

You can take the exam either at a Pearson-Vue center or from your home and office.

While recognizing that online is a very convenient approach that eliminates all logistical problems, in my case a small problem presented itself.

My method of recalling stored information and its processing to answer questions often requires the use of a pen and inkwell *.

Well, the exam with the “home and office” option does not allow the use of any pencil and sheet of paper while in Paerson-Vue authorized centers it is often possible to use a small whiteboard of the re-writable type.

In addition, by applying to a licensed center, you will also be helping Pearson-Vue centers to pay back their investment.

*: To take and digitize notes, I have been using Remarkable 2 with utmost satisfaction for 6 months, which I highly recommend to all readers.

VMCE 2021 – My experience

On January 24th I completed the VMCE 2021 training course.

In this article, I will describe the methodology I used in order to pass the final exam.

The six cornerstones of the preparation were:

1- Pay maximum attention to Veeam Backup & Replication components (Backup Server, Proxy, Wan Acceleration, Gateway) understanding their purpose, operation, and limitations. For example, for proxies to know the usage scenarios of the different transport modes (SAN, Virtual Appliance, Direct NFS, Network).

2- Understand the RPO (Recovery Point Object) and RTO (Recovery Time Object) theme by analyzing:

    • Type and topology of protection (Backup, Replica, and Backup Copy Job)
    • Type of repositories involved (Stand-alone, XFS / ReFS, Immutable, SOBR, capacity Tier and Archive Tier)
    • Backup chain (Forever Forward Incremental, Reversed Incremental and Forward Incremental)

Note 1 : to verify the preparation the advice is to respond to imaginary requests for protection; for example, thegable.it customer requested a daily primary backup of their VMs with an RPO of 31 days, with a GFS retention of 8 Weeks and 12 Months. In addition, the backup data will have to be copied to a second site …

3- Reinforce the knowledge on the available recovery options (VBR manual), through the Veeam Explorer, also in this case paying particular attention to the usage scenarios and limitations.

4- Massively use the laboratory to establish not only theoretical aspects but also real implementation scenarios.

5- Know the Veeam ONE features (Infrastructure, Data Protection, Business View).

Note 2: Laboratories simplify learning by often turning theory into a wonderful game of trial and error.

Preparation time was 42 days roughly divided into 2 hours/day on average during the week and 4 hours/day on average on weekends.

6- To check your progress and for the final review, the following are available:

VMCE 2021 Practice Exam

Concluding note:

Pearson-Vue test platform certifies VMCE-2021 competency.

You can take the exam either at a Pearson-Vue center or from your home and office.

While recognizing that online is a very convenient approach that eliminates all logistical problems, in my case a small problem presented itself.

My method of recalling stored information and its processing to answer questions often requires the use of a pen and inkwell *.

Well, the exam with the “home and office” option does not allow the use of any pencil and sheet of paper while in Pearson-Vue authorized centers it is often possible to use a small white board of the re-writable type.

In addition, by applying to a licensed center, you will also help Pearson-Vue centers pay back their investment.

*: To take and digitize notes, I have been using Remarkable 2 with utmost satisfaction for 6 months, which I highly recommend to all readers.