NAS backup – GFS su Tape – Parte I

Molti clienti e partner chiedono se sia possibile implementare una politica di protezione di tipo GFS (Grandfather – Father – Son), quando i dati da proteggere afferiscono ad una NAS (Network Attacched Storage) e la destinazione è una libreria a nastri.

Tale automatismo con la versione attuale di Veeam Backup & Replication (VBR) 12.1 non è ancora disponibile,  cosa invece è già possibile effettuare quando la sorgente del dato è un backup di VM e  Server Fisici.

In questo primo articolo vi aiuterò a raggiungere l’obiettivo, sfruttando la grande flessibilità di  VBR nella creazione dei job di backup.

Nota1: Nel prossimo vi illustrerò come realizzare copie GFS sfruttando una funzionalità poco conosciuta di VBR, il  Tape Copy.

Flessibilità dei Job di Backup:

a. VBR gestisce i nastri utilizzando un architettura che si basa su:

  •  Media Pool (MP) sono i contenitori logici dei nastri e possono afferire ad uno o più job di Backup (nel nostro scenario creeremo un MP per Job).
  • Media Set (MS) identifica i restore point presenti sul nastro (nel nostro scenario creeremo un MS per job di Backup per singolo nastro).

b. La soluzione proprosta è quella di creare job di backup settimanali, mensili e annuali  in modalità full.  Tali backup dovranno essere creati in uno specifica data e i backup dovranno risiedere su pool di nastri creati all’uopo.

Vediamo step by step come procedere:

c.  Creazione dei Media Pool (MP) settimanale e mensile

Immagine 1

Dall’immagine 2 è importante osservare che verrà utilizzato un nuovo nastro per ogni sessione di backup.

Immagine 2

Nell’immagine 3 è mostrato come impostare la retention che in questo scenario è di 4 settimane.

Immagine 3

Per il MP Mensile si utilizza la stessa procedura, modificando la retention in 12 mesi (vedi immagini 4,5,6).

Immagine 4

Immagine 5

Nell’immagine 6 si osserva che la retention per i Full Mensili è di 12 mesi.

Immagine 6

d. Creazione dei job di Backup

Immagine 7

immagine 8

L’immagine 9 evidenzia lo scheduling del job di Backup.

L’ipotesi è di realizzare n job di  backup full per ogni politica GFS.

Nel nostro scenario di esempio è riportato il job della prima settimana (freccia blue) con retention settimanale (freccia verde). Per la seconda, terza e successiva  settimana si procederà in modo del tutto analogo, sostituendo alla voce “Run the full backup automatically” il valore first con second, third ecc.

Immagine 9

L’immagine 10 evidenzia (freccia arancio) che non saranno avviati backup incrementali.

immagine 10

Gli stessi passaggi devono essere  implementati per creare backup GFS di tipo mensile, nell’esempio ho impostato l’avvio del job di backup il 4 sabato del mese (immagine 12 – freccia blue).

Immagine 11

Immagine 12

Immagine 13

Nota 2:

  • Il licensing conteggia le licenze per singolo job di Backup (verisione 12.1).
  • Effettuate dei test per essere certi che lo scenario corrisponda alle vostre necessità. Fatevi aiutare dal supporto Veeam.

Nel prossimo articolo vedremo come utilizzare la funzionalità di Tape Copy.

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.

Veeam Disaster Recovery Orchestrator v.5: Verifica dei componenti

Il presente articolo illustra come configurare il menù di amministrazione del Veeam Disaster Recovery Orchestrator (VDrO).

Prima di procedere alla fase di amministrazione, è indispensabile aver già etichettato le risorse che dovranno far parte dei piani di Disaster Recovery.

La classificazione è stata illustrata nel precedente articolo, disponibile cliccando sul seguente link: VDrO – VOne – Tagging.

Nota 1: Per accedere al menù di amministrazione, selezionate la voce denominata “Administration” (vedi immagine 1)

Immagine 1

La configurazione del menù di amministrazione si divide in tre principali aree:

Nella prima sono impostate:

  • Il nome del VDrO Server e il contact name (immagine 2).
  • le connessioni verso i Veeam Backup & Replication Server (VBR) (immagine 3)
  • le connessioni verso i vCenter (immagine 4)
  • la connessione opzionale verso gli storage (immagine 5) (fate riferimento al presente articolo per scoprire i dettagli)

Immagine 2

Immagine 3

Immagine 4

Immagine 5

La seconda area identifica attraverso il tagging le risorse da aggiungere ai piani di DR:

  • La recovery location (immagine 6)
  • Nella recovery location i datastore ove i filesystem delle VM resiederanno (immagine 7)
  • Il mapping delle reti (immagine 8)
  • Il remapping degli indirizzi IP (immagine 9)

Nota 2: Le operazioni sopra descritte sono possibili se e solo se tutte le risorse necessarie sono state etichettate.

Nota 3: Il remapping automatico degli indirizzi IP in caso di avvio di un piano di DR è disponibile solo per le VM Windows.

Immagine 6

Immagine 7

Immagine 8

Immagine 9

Nella terza area sono identificate:

  • La profilazione degli utenti. In parole semplici il VDrO permette di creare utenti in grado di amministrare solo degli specifici workload che sono chiamati “scopes” (immagine 10).
  • L’assegnazione dei DataLab agli  “scopes”. Ricordo che i DataLab permettono di  verificare che il piano di DR sia utilizzabile (immagine 11).

Immagine 10

Immagine 11

L’ultima configurazione permette di legare il gruppo di VM replicate o salvate tramite backup (dette VM Groups) agli scopes degli utenti.

Ad esempio, l’immagine 12 riporta che il VM Group “B&R Job – Replication VAO Win 10” è assegnato (included) ad entrambi gli scopes Admin e Linux.

Immagine 10

Nel prossimo ed ultimo articolo scopriremo come creare e verificare un piano di DR.

A presto

VBR – Mac Backup

Veeam Backup & Replication (VBR) version 11 has a new feature and Mac users will fall in love with it.

It is now available for the backup and restores of your MACOS files.

It supports the last Operating Systems starting from High-Sierra (Big Sur 11.X.X / Catalina 10.15.X / Mojave 10.14.X / High Sierra 10.13.6).

Note 1: The Veeam Agent for Mac (VAM) version 1 supports the M1 processor via Rosetta.

Note 2: The VAM supports consistent data backup with snapshots for the APFS file system.

In the other file systems, the backup is created via a snapshot-less approach.

Note 3: At the moment it’s possible to perform the backup of user data (with a custom scope too). The image of the entire machine and a Bare Metal Restore are not available yet.

The configuration steps are quite easy as shown in the official guide:

To recap, the procedure consists of:

  1. From the VBR console create a resource group using a flexible scope
  2. Copy the files generated from VBR to the MAC to protect
  3. Install the package to your machine and import the created configuration. (It allows the communication between VBR and the Mac)
  4. From the VBR console creating the backup policy and apply it

The following video shows how it works in a managed VBR architecture.

Take care and see you soon.

Ransomware defense part 2: Hardening

There are many documents on the internet that describe how to address this common request.

In this article, I’ll give you a track to move easier around this topic pointing out the most interesting articles.

Before starting let me thank Edwin Weijdema who created an  exhaustive guide to answer the common question (please click here to get it)

Are you ready? Let’s start

1- The first magic point for starting is Wikipedia where I got a good definition:

In computinghardening is usually the process of securing a system by reducing its surface of vulnerability, which is larger when a system performs more functions; in principle, a single-function system is more secure than a multipurpose one. Reducing available ways of attack typically includes changing default passwords, the removal of unnecessary software, unnecessary usernames or logins, and the disabling or removal of unnecessary services.

2- The second point is to understand the concept of Perimeter security:

It is natural barriers or artificially built fortifications that have the goal of keeping intruders out of the area . The strategies can be listed as:

  • Use rack-mount servers
  • Keep intruders from opening the case
  • Disable the drives
  • Lock up the server room
  • Set up surveillance

A complete article is available by clicking here

3- The third point is  Network segmentation:

It is the division of an organization network into smaller and, consequently, a more manageable grouping of interfaces called zones. These zones consist of IP ranges, subnets, or security groups designed typically to boost performance and security.

In the event of a cyberattack, effective network segmentation will confine the attack to a specific network zone and contain its impact by blocking lateral movement across the network via logical isolation through access controls.

Designating zones allows organizations to consistently track the location of sensitive data and assess the relevance of an access request based on the nature of that data.  Designating where sensitive data reside permits network and security operations to assign resources for more aggressive patch management and proactive system hardening.

A complete article is available by clicking here

4- Hardening your Backup Repositories

The next good rules involve your backup architecture and in specific the Backup Repositories:

Windows:

a. Use the built-in local administrator account

b. Set permissions on the repository directory

c. Modify the Firewall

d. Disable remote RDP services

Linux:

e. Create a Dedicated Repository Account

f. Set Permissions on the Repository Directory

g. Configure the Linux Repository in VeeamModify the Firewall

h. Use Veeam Encryption

Do you want to know more about security? If so the Veeam Best Practices are for sure the answer.

The next article will cover monitoring and automatic actions using Veeam-ONE.

5- Prevent injection of shady boot code​

Code injection, also called Remote Code Execution (RCE), occurs when an attacker exploits an input validation flaw in software to introduce and execute malicious code.

To prevent the attack please follow the following rules:

a. Run with UEFI Native Mode​
b. Use UEFI with Secure Boot Standard Mode​
c. Combine Secure Boot with TPM
d. Equip critical servers with a TPM 2.0

Stay tuned and see you soon

Veeam VBR DB Moving with SQL – Management Studio

In these last days, I had enough time to analyze my personal lab performances.

For testing purposes, I launched the backup of the whole architecture at the same time; the VM that suffered more was the backup server (VBR) and in particular the SQL Service.

This article will explain the steps I followed to move the VBR Database SQL Express from Backup & Replication to a SQL Server standard using SQL-Management Studio as a migration tool.

Before continuing reading the article, please watch at the following Veeam KBs and contact the Veeam Support

To make the description easier I’ll use the following acronyms :

  1. VBR = Backup Server
  2. SQLServer = Target Server where SQL Standard is installed
  3. SQLExpress = Source DB
  4. DB = VeeamBackup
  5. DBFile = VeeamBackup.mdf & VeeamBackup.ldf

The main steps to get the goal are:

  1. Stopping the Veeam service on VBR server
  2. Detaching DB from SQLExpress
  3. Copying DBFile from VBR to SQLServer
  4. Attaching DB to SQL Server
  5. Using the Veeam Migration tool
  6. Changing the service account name on VBR Service (optional)
  7. Checking up the register key
  8. Launching Backup and Restore tests

Let’s go!

  1. The first step is quite easy. Just connect to VBR, click on service and stop the SQL instance (Picture 1).

Picture 1

2. The second step is detaching the DB from SQL Express using SQL Management Studio (Picture 2).

Picture 2

If you need a good and short video guide to install SQL Management Studio please refer to the following link:

Another interesting video guide to understand how to enable the remote connection with SQL server is available here

Remember:  for enabling SQL Server to talk via Network (1433 is default port) you also have to set-up the firewall correctly.

3. Now it’s time to copy DBFiles from VBR to SQLServer

Pay attention to the default path where the files have to be copied and pasted.

Generally, it is in C:\Program Files\Microsoft SQLServer\ MSSQL.xx.INSTANCENAME\MSSQL\DATA (Picture 3).

Picture 3

4. Next step is attaching the DB to the new SQL server following the easy SQL Management studio menu ((Picture 4).

Picture 4

5. Now from the programs menu of VBR server, just select the voice Veeam and then “Configuration DataBase Connection Settings“.

Now choose which DBs you want to move to the new architecture. It can be Backup & Replication or the Enterprise Manager or both (Picture 5)

 

(Picture 5)

Now fill in the Database Name and Server/Instance and proceeding with the final step migration (Picture 6).

Picture 6

If everything is correctly configurated you have finally migrated your DBs.

Troubleshooting:

TS-1

If you see that the process runs out of time (600 seconds), it means that the VBR service account can’t access the database

How to solve it?

Please contact your DB experts before doing any tasks!!!

6. The first thing is creating a user able to manage the SQL services.

The procedure is quite easy using a Domain Controller (Picture 7-9)

Picture 7

Picture 8

Picture 9

Now you have to add the new user to Domain Users and Domain Admin groups (Picture 10-12).

Picture 10

Picture 11

Picture 12

From the Veeam Services window, select the Logon Service tab and set up the right user (and for all services that need it) (Picture 13 & 14)

Picture 13

Picture 14

Re-apply the procedure shown at point 5.

In my case, I’ve had another issue.

TS-2

The issue I unlucky met during my setup was the following:

When I tried to connect to remote DB with the “Configuration DataBase Connection Settings” command appeared the following error (Picture 15).

Picture 15

This issue happens when the SQL Server driver on a client computer that uses integrated security and the Windows security token, can’t connect to the SQL Server

If you want to have all details please refer to the following Microsoft article:

Cannot generate SSPI context

Please contact your DB experts before doing any tasks!!!

After some google research and test, I found a solution that addressed my issue always working with Domain Controller.

The AD console needs to be switched to advanced (Picture 16).

Picture 16

Now left-click on the SQL server and  select “attribute editor”

From this menu, you have to delete all the entries with the writing MSSQL.svc (Picture 17)

It also needs a server reboot.

Please contact your DB experts before doing any tasks!!!

Picture 17

For the last two points (7 and 8),  check-up, if the procedure followed, has solved the request.

TS-3

If you are not able to discover the SQL server, please check on the target Server if the SQL Server browser is up and running

Picture 18

 

From VBR Server open the register key (HKEY_LOCAL_MACHINE\ Software\Veeam\Veeam Backup and Replication) and check up if the items SqlDatabaseName, SQLinstanceName e SqlServerName are correctly filled in (Picture 19).

Do the same check-up for HKEY_LOCAL_MACHINE\Software\Veeam\Veeam Backup Catalog)  (Picture 20).

Picture 19

Picture 20

Now start backup Jobs and do some restore tasks to be sure that your Backup architecture is up and running.

In my case, the Backup Server can manage more tasks without any issue.

One more recommendation before ending the article:

Before doing any activities please read the official documentation and ask Veeam support