Posted on

Backup e Restore: Strategie Efficaci per la Protezione dei Dati Aziendali

La protezione dei dati è una delle priorità per qualsiasi azienda moderna. Tuttavia, spesso si commettono due errori critici:

  1. Limitarsi al backup senza testare il restore
  2. Non diversificare le tipologie di backup

In questo articolo esploreremo le diverse strategie di backup, la loro utilità e l’importanza di pianificare il ripristino dei dati per garantire la continuità operativa.


Backup di Singoli File e Dati: Una Protezione Mirata

Il backup di file, archivi e database è una delle soluzioni più comuni. Questo tipo di backup è essenziale per recuperare rapidamente file eliminati per errore o versioni precedenti di documenti e database.

Vantaggi del Backup di File e Dati

✔ Recupero rapido di file eliminati o modificati per errore
✔ Protezione di database e archivi critici senza dover ripristinare interi server
✔ Facilità di gestione e rapidità nel ripristino

💡 Caso pratico: Un utente ha accidentalmente sovrascritto un report aziendale. Con un backup dei file, è possibile ripristinare la versione precedente in pochi minuti.


Backup di Intere Macchine Virtuali: La Sicurezza Completa

Se il backup di file protegge i dati, il backup di intere macchine virtuali (VM) garantisce la continuità del sistema. Questo approccio permette di ripristinare un’intera infrastruttura IT in caso di guasti hardware o attacchi ransomware.

Vantaggi del Backup di Macchine Virtuali

✔ Ripristino rapido di un’intera VM senza dover reinstallare e configurare manualmente il sistema
✔ Protezione completa del sistema operativo, delle applicazioni e dei dati
✔ Possibilità di replicare ambienti di test o di emergenza

💡 Caso pratico: Un server aziendale è stato compromesso da un ransomware. Invece di tentare un recupero file per file, è possibile ripristinare l’intera VM in poche ore, minimizzando i tempi di inattività.


Backup in LAN e in Cloud: Perché è Importante la Ridondanza

Di solito, il backup di file e VM viene effettuato in LAN per garantire velocità e praticità nel ripristino. Tuttavia, fare almeno un backup in cloud è essenziale per garantire protezione da disastri locali (incendi, guasti hardware, attacchi informatici).

Strategia di Backup Consigliata

✅ Backup giornaliero in LAN per velocità ed efficienza
✅ Backup periodico in cloud per protezione da disastri
✅ Conservazione di più versioni per garantire il recupero di file precedenti

💡 Caso pratico: Un’azienda subisce un incendio che distrugge i server fisici. Senza un backup in cloud, tutti i dati sarebbero persi.


Restore: Il Grande Dimenticato nei Piani di Backup

Avere backup aggiornati è inutile se non si testa il ripristino. Nelle aziende è comune recuperare un singolo file perché un utente ne ha bisogno, ma raramente si verifica la capacità di ripristinare un’intera VM.

Perché Testare il Restore è Fondamentale

✔ Identificare eventuali errori nei backup prima di una reale emergenza
✔ Verificare la coerenza e l’integrità dei dati
✔ Garantire che il tempo di ripristino sia compatibile con le esigenze aziendali

💡 Caso pratico: Un’azienda si accorge, solo nel momento di un’emergenza, che i backup delle VM non sono ripristinabili a causa di un errore di configurazione. Un test preventivo avrebbe evitato il problema.


Conclusione

Un buon piano di backup non si limita a salvare i dati, ma include strategie di ripristino testate e ottimizzate.
🔹 Backup di file: per recuperi rapidi e protezione documentale
🔹 Backup di VM: per garantire la continuità operativa
🔹 Backup in cloud: per resilienza contro disastri
🔹 Test di restore periodici: per assicurare il funzionamento del sistema in caso di necessità

Se la tua azienda non ha ancora un piano di backup e restore ben strutturato, contattaci per una consulenza! 🚀

Posted on

Ghetto backup for all (part 1)

Why to use Ghetto ?

There are a lot of backup softwares for vmware virtual machine and some are free, but in a scenario it should not be possible to use one of these : for example, if you have vmware esx hosts with old versions (4.0,5.5).

Prepare connection to esx host  via SSH

Usually you get connection to esx host using vsphere client, but you have to use ghetto script directly inside esx operating system. So you need to operate using a prompt via ssh. Download, for example, putty : https://www.putty.org/

Install putty.

SSH port in esx host is number 22. To understand if this port is open, you could open a dos prompt and type

telnet your_esx_ip_address 22

you should recive some response.

Enable SSH on the ESX Host

By default SSH is disabled on an ESXi host.

  1. Open and login to the vSphere Client
  2. Click on the configuration tab and then on Security profile
  3. Click on Properties and Remote Tech Support (SSH)
  4. Click on Options and choose the startup policy.

ESX user for SSH

To connect to esx host via putty you need to create a user on esx. Open vsphere client.

  1. Log in to the vSphere Client as a root user.
  2. Click Users & Groups.
  3. Right-click on a blank area and click Add.
  4. Enter a username and password. Confirm your password.
  5. Select Grant shell access to this user.
  6. Select root group from the dropdown and click Add > OK.

 

How to upload script on esx

Ghetto script is a file and you will have to upload on esx server this file. To do this task we”l use for example WinSCP that is a free and open-source file transfer utility for Windows. It can be used to transfer files between a local and remote machine over SSH. You can download it from here : https://winscp.net/eng/download.php

Install it. Now you have all tools and we can start to work on Ghetto.

Ghetto script

First of all you need to download ghetto from github repository : https://github.com/lamw/ghettoVCB   

Unzip it. Open with an editor the file ghettoVCB.sh. You have to update only one line of script :

VM_BACKUP_VOLUME=/vmfs/volumes/mini-local-datastore-hdd/backups

That you have to substitute with the path of the datastore where you’ll save the backup of vm.

Two options to find the datastore path :

  1. Via vsphere client : you have to find the list of datastores. Using datastore’s name the path will be : /vmfs/volumes/DATASTORENAME
  2. Usng Putty connection : go in vmfs folder, volumes folder.

Prepare virtual machine list

If you ‘ll call ghetto script , you’ll backup all machines in your esx. Instead you can backup only some specific virtual machine. Create a new file, for example mylist.txt with the esactly name of each virtual machine to backup, in each line.

Upload Files to Esx

So you have two files (ghettoVCB.sh, mylist.txt) to upload in esx environment. To do this you can use WinSCP. When the Login dialog pops up click on New Site, enter the IP address in the hostname field, the username and password and then click Login.

WinSCP window is divided in two part : on the left side there is your computer, on the right side there is the esx environment. On esx, create a new folder and upload in it the two files.

Prepare ghetto script to execute

Double click on the PuTTY shortcut , enter the IP address of the ESX  and click Open. Enter the username and your password and you should now be connected.

To continue you need to have administrator (root) priviliges. Write

su -

and enter the password of root user.

Now you need to give execution privileges to .sh file. Navigate in the folder where you have put your files and write the command

chmod +x ghettoVCB.sh

Run the script

Write the command :

./ghettoVCB.sh -f mylist.txt -l output.txt

This command will backup all the virtual machines written in mylist.txt and will write the log of process in the file output.txt in the same folder.