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 e Veeam Backup & Replication – Parte 1

Il presente articolo illustrerà come implementare una strategia di protezione dei dati in ambienti MySQL.

Partiamo da una considerazione.

Per realizzare backup consistenti da un punto di vista applicativo, è necessario che prima che sia avviato  il processo di copia, l’applicazione abbia scritto su disco tutti i dati in memoria (flush).

Ad esempio, le applicazioni Microsoft® utilizzano una tecnologia denominata Shadow Copy che attraverso il coordinamento di driver VSS realizza la consistenza applicativa.

Una tecnologia simile non è disponibile su Linux ed in più MySQL non la supporta in ambiente Microsoft®.

Come ovviare?

Attraverso la creazione di script che automatizzino la consistenza applicativa prima di avviare la creazione della Snapshot.

Compreso questo aspetto, torniamo all’ambito dell’articolo, introducendo le opzioni disponibili per MySQL.

Nota 1: La consistenza applicativa avviene prima della creazione della snapshot.

  • 1. Backup Logico: Lo script crea un file con l’estensione .sql che in caso di ripristino permette la ricreazione del database e dei suoi dati.

Il file .sql è creato attraverso il comando nativo MySQL “mysqldump”.

I vantaggi del backup logico possono essere riassunti in:

  • Non vi sono dipendenze con software di terze parti.
  • I backup possono essere ripristinati su altri server.
  • 2. Backup Fisico/Cold: Sono create copie a freddo dei file del DB (ad esempio: ibdata, .ibd, .frm, ib_logfile, my.cnf).

Per essere certi che i backup siano realizzati in modalità “consistenza applicativa“, prima di effettuare la snapshot, è      indispensabile fermare i servizi MySQL.

E’ una strategia di backup di norma implementata in ambienti che non richiedano operatività 24×7.

Nota 2: Il servizio viene fermato solo per il tempo necessario alla creazione della snapshot e non per l’intera durata del backup.

  • 3. Backup Fisico/Hot: Se è in esecuzione il motore InnoDB, lo script permette la realizzazione di copie consistenti senza fermare i servizi (utilizzando ad esempio il comando mysqlbackup componente della suite Enterprise di MySQL (MySQL Product)).

Ora che conosciamo le opzioni di scripting disponibili, vediamo come le soluzioni Veeam possano integrarsi nativamente con gli  ambienti MySQL.

La prima opzione disponibile è il Veeam Agent for Linux (VAL) che automatizza le seguenti quattro fasi:

  1. Flush dei dati dalla memoria al disco (consistenza applicativa).
  2. Creazione della snasphot.
  3. Rilascio delle tabelle.
  4. Avvio del processo di Backup.

Nota 3: Come indicato nella prima parte dell’articolo, se il DB è del tipo MyISAM è possibile effettuare il backup con il blocco di tutte le tabelle.

I pre-requisti del VAL sono:

  • Versione di MySQL maggiore o uguale alla 5.8.
  • Sistema operativo sia Linux.

Domanda: E’ possibile effettuare il backup in ambienti Windows e dove la versione di MySQL è inferiore alla versione 5.8?

La risposta è si e gli scenari disponibili sono:

Backup Logico -> Hot-Backup Database Online Dump -> Comando mysqldump.

Backup Fisico/Cold -> Cold-Backup Database Shutdown -> Fermo temporaneo dei Servizi.

Backup Fisico/Hot -> Hot-Backup Database Freeze -> Comandi nativi mysql.

Nota4: Esiste anche la possibilità di effettuare Backup Parziali. In questo scenario si effettua il backup di specifiche tabelle e database. E’ utile quando si devono realizzare strategie di protezione differenti sullo stesso Server.

Nel prossimo articolo scopriremo come creare gli script e come integrarli 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 – La mia esperienza

Il 24 gennaio ho completato il percorso formativo VMCE 2021.

In questo articolo descriverò la metodologia che ho utilizzato al fine di superare l’esame finale.

I sei punti cardine della preparazione sono stati:

1- Porre la massima attenzione sui componenti di Veeam Backup & Replication (Backup Server, Proxy, Wan Acceleration, Gateway) comprendendone lo scopo, il funzionamento e le limitazioni. Ad esempio per i proxy conoscere gli scenari di utilizzo dei diversi transport mode (SAN, Virtual Appliance, Direct NFS, Network).

2- Comprendere il tema RPO (Recovery Point Object) e RTO (Recovery Time Object) analizzando:

    • Tipologia e topologia di protezione (Backup, Replica e Backup Copy Job)
    • Tipologia dei repository coinvolti (Stand-alone, XFS/ReFS, Immutabile, SOBR, capacity Tier e Archive Tier)
    • Catena di backup (Forever Forward Incremental, Reversed Incremental e Forward Incremental)

Nota 1: per verificare la preparazione il consiglio è quello di rispondere ad immaginarie richieste di protezione; ad esempio il cliente thegable.it ha richiesto un backup primario giornaliero delle proprie VM con un RPO di 31 giorni, con una retention di tipo GFS di 8 Settimane e 12 Mesi. Inoltre i dati di backup dovranno essere copiati in un secondo sito …

3- Rinforzare la conoscenza sulle opzioni disponibili di ripristino (manuale di VBR), attraverso i Veeam Explorer ponendo anche in questo caso particolare attenzione agli scenari di utilizzo e alle limitazioni.

4- Utilizzare massivamente il laboratorio per fissare non solo aspetti teorici ma anche scenari reali di implementazione.

5- Conoscere le funzionalità di Veeam ONE (Infrastructure, Data Protection, Business View).

Nota 2: I laboratori semplificano l’apprendimento trasformando spesso lo teoria in un meraviglioso gioco di prove e test.

Il tempo di preparazione è stato di 42 giorni suddivisi in modo grossolano in 2 ore/giorno di media durante la settimana e 4 ore/giorno di media durante i week end.

6- Per verificare il proprio stato di avanzamento e per il ripasso finale sono disponibili:

VMCE 2021 Practice Exam

Nota conclusiva:

La piattaforma di test Pearson-Vue certifica la competenza VMCE-2021.

E’ possibile sostenere l’esame sia in un centro Pearson-Vue che dalla propria abitazione e ufficio.

Pur riconoscendo che l’ on-line è un approccio molto comodo che elimina tutte le problematiche di logistica, nel mio caso si è presentato un piccolo problema.

Il mio metodo di richiamo delle informazioni memorizzate e della loro elaborazione per rispondere ai quesiti, richiede infatti spesso l’utilizzo di penna e calamaio*.

Ebbene, l’esame con opzione “da casa e ufficio”  non consente l’utilizzo di alcuna matita e foglio di carta mentre nei centri autorizzati Pearson-Vue spesso è possibile utilizzare una piccola lavagna bianca del tipo ri-scrivibile.

Inoltre candidandosi presso un centro abilitato, aiutaterete inoltre i centri Pearson-Vue a rientrare dall’investimento effettuato.

*: Per prendere e digitalizzare appunti, utilizzo con massima soddisfazione da 6 mesi il Remarkable 2 che consiglio vivamente a tutti i lettori.

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.