Backup VM ESXi with Bareos (2023)

Backup VM ESXi with Bareos (1)

Continuing a series of publications about backup capabilities with Bareos. This article is about backup VM ESXi using Bareos.

Previous posts: "Backup using Open Source Solution - Bareos"
')
VMware ESXi virtual machines are often backed up by tools like Veeam or the ghettovcb script. In this article, we will look at how to backup a virtual machine using Bareos 16.2, namely, we will use one of the plugins that allows you to extend the functionality of Bareos - vmware-plugin. In the 16th version, the location of the configuration files was changed, now each resource (pool, client, job, etc.) was distributed in its directories, multilingual added for the web UI, the MySQL plugin was improved, more detailed documentation can be viewed here .

For this example, we have ESXi 6.0 (the Evaluation license is enough for the plugin to work) and the server under CentOS 7, on which Bareos will be installed.

Add a repository:

wget http://download.bareos.org/bareos/release/16.2/CentOS_7/bareos.repo -O /etc/yum.repos.d/bareos.repo 

Install the necessary components:

 yum install -y bareos-client bareos-database-tools bareos-filedaemon bareos-database-postgresql bareos bareos-bconsole bareos-database-common bareos-storage bareos-director bareos-common 

Install the database:

 yum install -y postgresql-server postgresql-contrib 

After installation we will execute:

 # postgresql-setup initdb 

Run the database preparation scripts installed with Bareos:

 su postgres -c /usr/lib/bareos/scripts/create_bareos_database su postgres -c /usr/lib/bareos/scripts/make_bareos_tables su postgres -c /usr/lib/bareos/scripts/grant_bareos_privileges 

More information about the installation and description of the components, as well as a description of the main directives can be found here.

The list of directories in the 16th version looks like this:

 /bareos-dir-export /bareos-dir.d /catalog /client /console /counter /director /fileset /job /jobdefs /messages /pool /profile /schedule /storage /bareos-fd.d /client /director /messages /bareos-sd.d /autochanger /device /director /messages /ndmp /storage /tray-monitor.d /client /director /storage bconsole.conf 

Each subdirectory has its own configuration file, which is responsible for the resource corresponding to the directory name.

Before making any settings, you must make sure that all the requirements for the operation of the VMware plugin are met. The official list of requirements can be viewed here .

You need to install all the dependencies before installing the plugin.
Add one of the EPEL repositories, because we will need some packages for further installation:

 rpm -ivh yum install python yum install python-pip yum install python-wheel pip install --upgrade pip pip install pyvmomi yum install python-pyvmomi : yum install bareos-vmware-plugin 

It is imperative that the VM on ESXi supports and is enabled by CBT (Changed Block Tracking). On the VMware website it is indicated how this option is enabled, however there is an easier way - using a script. The script itself is called vmware_cbt_tool and can be taken on GitHub.

After downloading to the BareOS server, and going to the script directory, you need to do the following:

 ./vmware_cbt_tool.py -s 172.17.10.1 -u bakuser -p kJo@#!a -d ha-datacenter -f / -v ubuntu --info 

By options:

-s - server address
-u - user on ESXi (specially brought bakuser user)
-p - his password
-d - the name of our "datacenter" in ESXi, by default "ha-datacenter"
-f - folder with our VM, default root
-v - the name of the VM itself
--info - shows us the current CBT settings for the VM

Backup VM ESXi with Bareos (2)

Having executed the command, you should see:

 INFO: VM ubuntu CBT supported: True INFO: VM ubuntu CBT enabled: False 

That is, CBT is supported, but is not currently enabled, so we’ll include the --enablecbt option at the end of the command using the same script.

 ./vmware_cbt_tool.py -s 172.17.10.1 -u bakuser -p kJo@#!a -d ha-datacenter -f / -v ubuntu --enablecbt 

As a result, we will see the following:

 INFO: VM ubuntu CBT supported: True INFO: VM ubuntu CBT enabled: False INFO: VM ubuntu trying to enable CBT now INFO: VM ubuntu trying to create and remove a snapshot to activate CBT INFO: VM ubuntu successfully created and removed snapshot 

CBT successfully enabled.

Now you need to go to the settings of the BareOS, you can also follow the official documentation.

Here is the contents of the configs:

 /etc/bareos/bareos-dir.d/client/bareos-fd.conf Client { Name = vmware # localhost Address = localhost Password = "wai2Aux0" } /etc/bareos/bareos-dir.d/director/bareos-dir.conf Director { Name = "bareos-dir" QueryFile = "/usr/lib/bareos/scripts/query.sql" Maximum Concurrent Jobs = 10 Password = "wai2Aux0" Messages = Standard Auditing = yes } 

The next file in this example is one of the most important, since it specifies the options for the plugin

 /etc/bareos/bareos-dir.d/fileset/SelfTest.conf FileSet { Name = "vm-ubuntu" Include { Options { signature = MD5 Compression = GZIP } Plugin = "python:module_path=/usr/lib64/bareos/plugins/vmware_plugin:module_name=bareos-fd-vmware:dc=ha-datacenter:folder=/:vmname=ubuntu:vcserver=172.17.10.1:vcuser=bakuser:vcpass=kJo@#!a" } } 

python: module_path = / usr / lib64 / bareos / plugins / vmware_plugin - specify where the plugin is located
module_name = bareos-fd-vmware - specify its name
dc - datacenter name in ESXi
folder - folder with VM, default root
vmname is the name of the virtual machine
vcserver - server address
vcuser - user login specially created for work with backup
vcpass - his password

Job Description for backup:

 /etc/bareos/bareos-dir.d/job/backup-bareos-fd.conf Job { Name = "vm-ubuntu-backup-job" JobDefs = "DefaultJob" Client = "vmware" } /etc/bareos/bareos-dir.d/jobdefs/DefaultJob.conf JobDefs { Name = "DefaultJob" Type = Backup Level = Incremental FileSet = "vm-ubuntu" Schedule = "WeeklyCycle" Storage = bareos-sd Messages = Standard Pool = Incremental Priority = 10 Write Bootstrap = "/var/lib/bareos/%c.bsr" Full Backup Pool = Full Differential Backup Pool = Differential Incremental Backup Pool = Incremental } 

Job Description for Recovery:

 /etc/bareos/bareos-dir.d/job/RestoreFiles.conf Job { Name = "RestoreFiles" Type = Restore Client = vmware FileSet = "vm-ubuntu" Storage = bareos-sd Pool = Incremental Messages = Standard Where = /tmp/ } 

Setting alerts:

 /etc/bareos/bareos-dir.d/messages/Standard.conf Messages { Name = Standard # email mailcommand = "/usr/bin/bsmtp -h localhost -f \"\(Bareos\) \<%r\>\" -s \"Bareos: Intervention needed for %j\" %r" operator = root@localhost = mount # mail = admin@testdomain.com = alert,error,fatal,terminate, !skipped # console = all, !skipped, !saved # , , .. append = "/var/log/bareos/bareos.log" = all, !skipped # catalog = all } 

The type of letter that comes will be displayed for clarity later.

Pool Description:

 /etc/bareos/bareos-dir.d/pool/Full.conf Pool { Name = Full Pool Type = Backup Recycle = yes AutoPrune = yes Volume Retention = 365 days Maximum Volume Bytes = 50G Maximum Volumes = 100 Label Format = "Full-" } /etc/bareos/bareos-dir.d/pool/Incremental.conf Pool { Name = Incremental Pool Type = Backup Recycle = yes AutoPrune = yes Volume Retention = 30 days Maximum Volume Bytes = 1G Maximum Volumes = 100 Label Format = "Incremental-" } 

We will not give the example of the Differential pool, since even though it is listed in JobDefs, we will not use it.

Schedule setting:

 /etc/bareos/bareos-dir.d/schedule/WeeklyCycle.conf Schedule { Name = "WeeklyCycle" # 21:00 Run = Full on 1 at 21:00 # 31 Run = Full 2-31 at 01:00 # 2 31 10,15 19:00 Run = Incremental on 2-31 at 10:00 Run = Incremental on 2-31 at 15:00 Run = Incremental on 2-31 at 19:00 } 

Description of the connection to the inventory:

 /etc/bareos/bareos-dir.d/storage/File.conf Storage { Name = bareos-sd Address = localhost Password = "wai2Aux0" Device = FileStorage Media Type = File } 

The settings for the inventory itself:

 /etc/bareos/bareos-sd.d/device/FileStorage.conf Device { Name = FileStorage Media Type = File Archive Device = /opt/backup LabelMedia = yes; Random Access = yes; AutomaticMount = yes; RemovableMedia = no; AlwaysOpen = no; } 

Parameters for connecting the store to the director:

 /etc/bareos/bareos-sd.d/director/bareos-dir.conf Director { Name = bareos-dir Password = "wai2Aux0" } 

Used alert options:

 /etc/bareos/bareos-sd.d/messages/Standard.conf Messages { Name = Standard Director = bareos-dir = all } /etc/bareos/bareos-sd.d/storage/bareos-sd.conf Storage { Name = bareos-sd Maximum Concurrent Jobs = 20 } 

It is imperative that the server connects the plug-in, this is done in the following config:

 /etc/bareos/bareos-fd.d/client/myself.conf Client { Name = vmware Maximum Concurrent Jobs = 20 # Plugin Directory = /usr/lib64/bareos/plugins Plugin Names = "python" } 

Connection to director:

 /etc/bareos/bareos-fd.d/director/bareos-dir.conf Director { Name = bareos-dir Password = "wai2Aux0" } 

Type of alerts sent to the director:

 /etc/bareos/bareos-fd.d/messages/Standard.conf Messages { Name = Standard Director = bareos-dir = all, !skipped, !restored } 

Forcibly in manual mode, perform a backup, for this we log in to bconsole

 *run Automatically selected Catalog: MyCatalog Using Catalog "MyCatalog" A job name must be specified. The defined Job resources are: 1: RestoreFiles 2: vm-ubuntu-backup-job Select Job resource (1-2): 2 Run Backup job JobName: vm-ubuntu-backup-job Level: Incremental Client: vmware Format: Native FileSet: vm-ubuntu Pool: Incremental (From Job IncPool override) Storage: bareos-sd (From Job resource) When: 2016-11-14 07:22:11 Priority: 10 OK to run? (yes/mod/no): yes 

With the message command, we can observe what is happening with the task, we see that the process started successfully:

 14-Nov 07:22 vmware JobId 66: python-fd: Starting backup of /VMS/ha-datacenter/ubuntu/[datastore1] ubuntu/ubuntu.vmdk_cbt.json 14-Nov 07:22 vmware JobId 66: python-fd: Starting backup of /VMS/ha-datacenter/ubuntu/[datastore1] ubuntu/ubuntu.vmdk 

During the execution of the task on the ESXi side, you can observe that in the message output console there will be corresponding notifications that the virtual machine disk is being accessed, and the temporary snapshot is deleted at the end.

Backup VM ESXi with Bareos (3)

The incoming message looks like this:

 13-Nov 22:47 bareos-dir JobId 36: No prior Full backup Job record found. 13-Nov 22:47 bareos-dir JobId 36: No prior or suitable Full backup found in catalog. Doing FULL backup. 13-Nov 22:47 bareos-dir JobId 36: Start Backup JobId 36, Job=vm-ubuntu-backup-job.2016-11-13_22.47.47_04 13-Nov 22:47 bareos-dir JobId 36: Using Device "FileStorage" to write. 13-Nov 22:47 bareos-sd JobId 36: Volume "Full-0001" previously written, moving to end of data. 13-Nov 22:47 bareos-sd JobId 36: Ready to append to end of Volume "Full-0001" size=583849836 13-Nov 22:47 vmware JobId 36: python-fd: Starting backup of /VMS/ha-datacenter/ubuntu/[datastore1] ubuntu/ubuntu.vmdk_cbt.json 13-Nov 22:47 vmware JobId 36: python-fd: Starting backup of /VMS/ha-datacenter/ubuntu/[datastore1] ubuntu/ubuntu.vmdk 13-Nov 22:51 bareos-sd JobId 36: Elapsed time=00:04:01, Transfer rate=2.072 M Bytes/second 13-Nov 22:51 bareos-dir JobId 36: Bareos bareos-dir 16.2.4 (01Jul16): Build OS: x86_64-redhat-linux-gnu redhat CentOS Linux release 7.0.1406 (Core) JobId: 36 Job: vm-ubuntu-backup-job.2016-11-13_22.47.47_04 Backup Level: Full (upgraded from Incremental) Client: "vmware" 16.2.4 (01Jul16) x86_64-redhat-linux-gnu,redhat,CentOS Linux release 7.0.1406 (Core) ,CentOS_7,x86_64 FileSet: "vm-ubuntu" 2016-11-13 22:47:47 Pool: "Full" (From Job FullPool override) Catalog: "MyCatalog" (From Client resource) Storage: "bareos-sd" (From Job resource) Scheduled time: 13-Nov-2016 22:47:45 Start time: 13-Nov-2016 22:47:50 End time: 13-Nov-2016 22:51:51 Elapsed time: 4 mins 1 sec Priority: 10 FD Files Written: 2 SD Files Written: 2 FD Bytes Written: 499,525,599 (499.5 MB) SD Bytes Written: 499,527,168 (499.5 MB) Rate: 2072.7 KB/s Software Compression: 73.1 % (gzip) VSS: no Encryption: no Accurate: no Volume name(s): Full-0001 Volume Session Id: 9 Volume Session Time: 1479067525 Last Volume Bytes: 1,083,996,610 (1.083 GB) Non-fatal FD errors: 0 SD Errors: 0 FD termination status: OK SD termination status: OK Termination: Backup OK 

As you can see, the message indicates a successful backup, the type of backup Full, recorded 499.5 Mb (on the ESXi side, the vmdk file takes 560 M). In the FileSet settings, we set the gzip compression type, which is also visible in the Software Compression line in this message.

The error message will look like this. In this example, as we can see, the error was modeled, if we did not activate the CBT mode for the VM, which we included in the previous steps using a special script.

Expand

 14-Nov 01:17 vmware JobId 39: Fatal error: python-fd: Error VM VMBitrix5.1.8 is not CBT enabled 14-Nov 01:17 vmware JobId 39: Fatal error: fd_plugins.c:654 Command plugin "python:module_path=/usr/lib64/bareos/plugins/vmware_plugin:module_name=bareos-fd-vmware:dc=ha-datacenter:folder=/:vmname=VMBitrix5.1.8:vcserver=172.17.10.1:vcuser=bakuser:vcpass=kJo@#!a" requested, but is not loaded. 14-Nov 01:17 bareos-dir JobId 39: Error: Bareos bareos-dir 16.2.4 (01Jul16): Build OS: x86_64-redhat-linux-gnu redhat CentOS Linux release 7.0.1406 (Core) JobId: 39 Job: vm-bitrix-backup-job.2016-11-14_01.17.51_04 Backup Level: Full (upgraded from Incremental) Client: "vmware" 16.2.4 (01Jul16) x86_64-redhat-linux-gnu,redhat,CentOS Linux release 7.0.1406 (Core) ,CentOS_7,x86_64 FileSet: "vm-bitrix-fileset" 2016-11-14 01:17:51 Pool: "vm-bitrix-Full" (From Job FullPool override) Catalog: "MyCatalog" (From Client resource) Storage: "bareos-sd" (From Job resource) Scheduled time: 14-Nov-2016 01:17:47 Start time: 14-Nov-2016 01:17:53 End time: 14-Nov-2016 01:17:54 Elapsed time: 1 sec Priority: 10 FD Files Written: 0 SD Files Written: 0 FD Bytes Written: 0 (0 B) SD Bytes Written: 0 (0 B) Rate: 0.0 KB/s Software Compression: None VSS: no Encryption: no Accurate: no Volume name(s): Volume Session Id: 12 Volume Session Time: 1479067525 Last Volume Bytes: 0 (0 B) Non-fatal FD errors: 1 SD Errors: 0 FD termination status: Fatal Error SD termination status: Canceled Termination: *** Backup Error *** 

In accordance with our schedule in the directive Schedule {} director directive, 3 incremental backups were to be executed during the day (the last one in the Full backup list was made manually). In bconsole, the “status dir” command allows you to see how much the size of incremental backups differs from the full backup:

Backup VM ESXi with Bareos (4)

As for the recovery, it can be performed immediately to the ESXi host, which is performed by default, but for this the virtual machine itself must be turned off. Or you can restore to a server with BareOS. Consider both options.

When restoring locally to a server with BareOS. Go to bconsole:

 *restore Automatically selected Catalog: MyCatalog Using Catalog "MyCatalog" First you select one or more JobIds that contain files to be restored. You will be presented several methods of specifying the JobIds. Then you will be allowed to select which files from those JobIds are to be restored. To select the JobIds, you have the following choices: 1: List last 20 Jobs run 2: List Jobs where a given File is saved 3: Enter list of comma separated JobIds to select 4: Enter SQL list command 5: Select the most recent backup for a client 6: Select backup for a client before a specified time 7: Enter a list of files to restore 8: Enter a list of files to restore before a specified time 9: Find the JobIds of the most recent backup for a client 10: Find the JobIds for a backup for a client before a specified time 11: Enter a list of directories to restore for found JobIds 12: Select full restore to a specified Job date 13: Cancel Select item: (1-13): 3 Enter JobId(s), comma separated, to restore: 66 Building directory tree for JobId(s) 66 ... 1 files inserted into the tree. You are now entering file selection mode where you add (mark) and remove (unmark) files to be restored. No files are initially added, unless you used the "all" keyword on the command line. Enter "done" to leave this mode. cwd is: / $ ls VMS/ $ mark * 1 file marked. $ done Defined Clients: 1: vmware ... Select the Client (1-4): 1 Using Catalog "MyCatalog" Client "bareos-fd" not found. Automatically selected Client: vmware Restore Client "bareos-fd" not found. Automatically selected Client: vmware Run Restore job JobName: RestoreFiles Bootstrap: /var/lib/bareos/bareos-dir.restore.1.bsr Where: /tmp/ Replace: Always FileSet: vm-ubuntu Backup Client: bareos-fd Restore Client: vmware Format: Native Storage: bareos-sd When: 2016-11-14 07:37:57 Catalog: MyCatalog Priority: 10 Plugin Options: *None* OK to run? (yes/mod/no): mod Parameters to modify: 1: Level 2: Storage 3: Job 4: FileSet 5: Restore Client 6: Backup Format 7: When 8: Priority 9: Bootstrap 10: Where 11: File Relocation 12: Replace 13: JobId 14: Plugin Options Select parameter to modify (1-14): 14 Please enter Plugin Options string: python:localvmdk=yes Run Restore job JobName: RestoreFiles Bootstrap: /var/lib/bareos/bareos-dir.restore.1.bsr Where: /tmp/ Replace: Always FileSet: vm-ubuntu Backup Client: vmware Restore Client: vmware Format: Native Storage: bareos-sd When: 2016-11-14 07:37:57 Catalog: MyCatalog Priority: 10 Plugin Options: python:localvmdk=yes OK to run? (yes/mod/no): yes 

After that, you can go to the / tmp folder and see the restored vmdk file.

 cd /tmp/" [datastore1] ubuntu" ls ubuntu.vmdk 

Restoring directly to ESXi does not require making any edits before performing restore, but as stated earlier, you need to shut down the virtual machine before this, otherwise an error will occur:

 JobId 80: Fatal error: python-fd: Error VM VMBitrix5.1.8 must be poweredOff for restore, but is poweredOn 

As a test, it is enough to create a couple of test files on the virtual machine, run Job on the backup. Delete these files, turn off the machine, and restore via the restore command without making edits as in the previous example, as a rule, deleted files will be in the same place.

Now consider the possibility of adding a backup for another VM, its name is “VMBitrix5.1.8”

Important! First, you need to connect the plug-ins for working with VMware in the settings of the director in the /etc/bareos/bareos-dir.d/director/bareos-dir.conf file, otherwise when connecting additional tasks for VM backup, you will receive an error about an unloaded plug-in:

Example:

 JobId 41: Fatal error: fd_plugins.c:654 Command plugin "python:module_path=/usr/lib64/bareos/plugins/vmware_plugin:module_name=bareos-fd-vmware:dc=ha-datacenter:folder=/:vmname=" requested, but is not loaded 

Now the /etc/bareos/bareos-dir.d/director/bareos-dir.conf file should look like this:

 Director { # define myself Name = "bareos-dir" QueryFile = "/usr/lib/bareos/scripts/query.sql" Maximum Concurrent Jobs = 10 Password = "wai2Aux0" # Console password Messages = Standard Auditing = yes Plugin Directory = /usr/lib64/bareos/plugins Plugin Names = "python" } 

As you can see the lines below and connected the plugin:

 Plugin Directory = /usr/lib64/bareos/plugins Plugin Names = "python" 

Next, we proceed to editing the FileSet {} directive for backup of the second virtual machine

 /etc/bareos/bareos-dir.d/fileset/SelfTest.conf 

After adding new lines for VMBitrix5.1.8 virtual machine backup, the file looks like this:

 FileSet { Name = "vm-ubuntu" Include { Options { signature = MD5 Compression = GZIP } Plugin = "python:module_path=/usr/lib64/bareos/plugins/vmware_plugin:module_name=bareos-fd-vmware:dc=ha-datacenter:folder=/:vmname=ubuntu:vcserver=172.17.10.1:vcuser=bakuser:vcpass=qLpE1QQv" } } FileSet { Name = "vm-bitrix" Include { Options { signature = MD5 Compression = GZIP } Plugin = "python:module_path=/usr/lib64/bareos/plugins/vmware_plugin:module_name=bareos-fd-vmware:dc=ha-datacenter:folder=/:vmname=VMBitrix5.1.8:vcserver=172.17.10.1:vcuser=bakuser:vcpass=kJo@#!a" } } 

Moving on to adding a new Job for the backup of a new VM, create a file backup-bareos-bitrix.conf in the /etc/bareos/bareos-dir.d/job directory. In this file we will write the parameters for the new Job (the group and the owner of all created files should be “bareos”):

 Job { Name = "vm-bitrix-backup-job" Client = "vmware" Type = Backup Level = Incremental FileSet = "vm-bitrix" Schedule = "WeeklyCycle" Storage = bareos-sd Messages = Standard Pool = vm-bitrix-Incremental Priority = 10 Write Bootstrap = "/var/lib/bareos/%c.bsr" Full Backup Pool = vm-bitrix-Full Incremental Backup Pool = vm-bitrix-Incremental } 

You also need to create a job to restore if necessary for the second VMBitrix5.1.8 virtual machine. Create a file /etc/bareos/bareos-dir.d/job/restorefiles-vm-bitrix.conf.

Its contents are:

 Job { Name = "restorefiles-vm-bitrix" Type = Restore Client = vmware FileSet = "vm-bitrix" Storage = bareos-sd Pool = vm-bitrix-Incremental Messages = Standard Where = /tmp/ } 

Be sure to follow the correspondences between FileSet and Pool.

As you can see, it is also necessary to create new pools. Go to the /etc/bareos/bareos-dir.d/pool directory

Create two files Full-vm-bitrix.conf and Incremental-vm-bitrix.conf. Here is the content of each:

 # cat /etc/bareos/bareos-dir.d/pool/Full-vm-bitrix.conf Pool { Name = vm-bitrix-Full Pool Type = Backup Recycle = yes AutoPrune = yes Volume Retention = 365 days Maximum Volume Bytes = 50G Maximum Volumes = 100 Label Format = "Full-vm-bitrix-" } # cat /etc/bareos/bareos-dir.d/pool/Incremental-vm-bitrix.conf Pool { Name = vm-bitrix-Incremental Pool Type = Backup Recycle = yes AutoPrune = yes Volume Retention = 30 days Maximum Volume Bytes = 1G Maximum Volumes = 100 Label Format = "Incremental-vm-bitrix-" } 

Again, as in the previous steps, you need to activate CBT for the second VM via the vmware_cbt_tool script

After making any changes to the config, it is necessary to restart the services:

 systemctl restart bareos-fd systemctl restart bareos-dir 

If there are no errors, you can go back to the bconsole console and see the added jobs for the new VM

New Job List:

Backup VM ESXi with Bareos (5)

Run a new task:

Backup VM ESXi with Bareos (6)

Partial output of the “status dir” command after a successful backup:

Backup VM ESXi with Bareos (7)

As for the recovery of the second virtual machine, it is no different from the recovery example of the first one. Adding additional tasks for backup of additional VM is similar to adding a task for backup of the second VM.

Backup VM ESXi with Bareos (8)

SIM-CLOUD - Fail-safe cloud in Germany

Dedicated servers in reliable data centers in Germany!
Any configuration, quick build and free installation

FAQs

How do I backup my ESXi VM? ›

Method 1. Backup VMDK file of ESXi VM
  1. Right-click the VM and select Edit Settings.
  2. Expand the Hard disk and then you can find the location of .vmdk file of the VM.
  3. Click Files on the right.
  4. Click COPY TO.
  5. Right-clik the VM and select Template.
  6. Select Export OVF Template.
  7. Give a name to the task and click OK.
Jan 31, 2023

How to backup VMware virtual machine? ›

To back up the virtual machine:
  1. Ensure your virtual machine is in a powered off state.
  2. Locate the virtual machine folder. ...
  3. Right-click the virtual machine folder and click Copy.
  4. Navigate to the folder in which you want to store the backup, right-click anywhere within the folder, and click Paste.
Sep 24, 2018

How do I backup my VM using vCenter? ›

Navigate to the summary tab and click the Backup button to launch the Backup Appliance wizard. The VCSA file-based backup feature requires no quiescing or downtime of the selected appliance. By default, the configuration and inventory data of a vCenter Server Appliance are backed up.

How does a virtual machine backup work? ›

Virtual machine backup (VM backup) is the process of backing up the virtual machines (VMs) running in an enterprise environment. VMs usually run as guests on hypervisors that emulate a computer system, and allow multiple VMs to share a physical host hardware system.

Can you backup an ESXi host? ›

Using the ESXi command line is the most affordable method to back up ESXi host configuration. You don't need to install any additional software to use the ESXi command line. You have to enable ESXi shell and remote SSH access to an ESXi host.

What is the best way to backup a VM? ›

You can back up all your VMs by simply backing up the VMDK files. Fast image recovery is possible since the process involves the streaming back of a large image file instead of seeking many small files. Using the VCB Proxy server for your backup process reduces the ESX server's overhead.

What is the difference between VM snapshot and backup? ›

The main difference between snapshots and backups is that the latter is isolated from the mainframe. That means snapshot copies are stored on the original network, unlike backup copies. Snapshots work well for frequent protection measured in minutes or hours while backups are used for regular protection.

What are the backup options for VMware? ›

Backup solutions for VMware ESXi
  • ghettoVCB. ...
  • Other script based solutions. ...
  • VMware Converter Standalone. ...
  • File copy solutions. ...
  • VMware Consolidated Backup (VCB) ...
  • VMware Data Recovery (VDR) ...
  • Veeam Backup & Replication. ...
  • Quest (Vizioncore) vRanger Pro.

Can you backup a running VM? ›

VMware stores each VM as a VM file (typically a VMDK file). You can backup these files to protect entire VMs in a one easy step. Unlike operating system backups that can take a long time and consume significant system resources, copying a VMDK file is a quick and simple operation.

How to take OVF backup in VMware? ›

Procedure
  1. Select the virtual machine and select File > Export to OVF.
  2. Enter a name for the OVF file and specify a directory in which to save it.
  3. Specify whether to export the virtual machine as an OVF, a folder with separate files, or as an OVA, a single-file archive.
  4. Click Export to start the OVF export process.
Oct 20, 2022

How to backup ESXi host configuration from vCenter? ›

Backing up ESXi host configuration data
  1. To synchronize the configuration changed with persistent storage, run this command: # vim-cmd hostsvc/firmware/sync_config.
  2. To back-up the configuration data for the ESXi host, run this command: # vim-cmd hostsvc/firmware/backup_config.
Feb 27, 2023

What is VMware consolidated back up? ›

VMware Consolidated Backup (VCB) refers to a backup framework that offloads VM backup off the ESX server. The configuration eliminates backup traffic from a network and frees ESX server resources for VM performance. Other features of VCB include: Full and incremental file-level backups on top of full image backups.

What backup solution is best for the on premises virtual machines? ›

Azure Backup Server orchestrates the backup of machines and manages the configuration of the restore procedures.

Is A VM clone a backup? ›

It is used for backup purposes. If you need to save the configuration of a virtual machine so you can revert back to it later if something goes awry, create a snapshot. A clone, by contrast, is an entirely separate copy of the VM. If you need to make a new VM that will run independently, cloning is the only way to go.

Is VM snapshot a full backup? ›

The main distinction between backups and snapshots is that backups are independent, self-contained files that don't require cross-file dependencies to restore a VM, whereas snapshots rely on dependent files for VM restoration.

How do I backup my ESXi 6.7 host? ›

How to backup and restore ESXi host configuration with ESXi command line?
  1. Connect to ESXi host via SSH.
  2. Run the command below: vim-cmd hostsvc/firmware/sync_config. ...
  3. Run the command below: vim-cmd hostsvc/firmware/backup_config. ...
  4. Open a web browser and copy and paste the link into it. Type Enter.
Mar 1, 2023

What happens when an ESXi host runs out of memory? ›

Currently, there is no resolution. An ESXi host can run out of reservation if virtual machines consume all reservable memory, so we recommend leaving sufficient amount of reservable memory available so that other system groups (i.e. services) can get requested amount of memory during run time.

Can you backup an ESXi host with Veeam? ›

Configuring Veeam Backup and Replication for Backups

After you install Veeam Backup and Replication, you are ready to connect it to the vSphere ESXi host that contains the AltaVault virtual appliance. Start Veeam Backup and Replication.

What is VM backup vs replication? ›

VM backups are intended to store your data for as long as deemed necessary, so you can go back in time and restore what was lost, while VM replicas (the result of replication) are intended to restore the VMs as soon as possible, hence the differences in the technologies used to proceed with both.

Does VMware do backups? ›

VMware backup is the process of copying data from a virtual machine (VM) in a VMware environment to another, separate location to prevent data from being permanently lost or damaged.

What is the difference between OVF and ova? ›

OVF packages contain a series of uncompressed files that make it easier to access individual disk images in the file. OVA packages are just one large file. While you can compress this file, it doesn't have the flexibility of a series of files like OVF.

What are the disadvantages of snapshot in VM? ›

Snapshots can negatively affect the performance of a virtual machine. Performance degradation is based on how long the snapshot or snapshot tree is in place, the depth of the tree, and how much the virtual machine and its guest operating system have changed from the time you took the snapshot.

Should I power off VM before snapshot? ›

Raw disks and RDM physical mode disks do not support VMware snapshots. However, RDM (Raw Device Mapping) with virtual compatibility mode supports snapshots. Independent disks do not support VMware snapshots. To create a snapshot, VMs with independent disks must be powered off first.

Can VMware snapshot be used as a backup? ›

Do not use VMware snapshots as backups. The snapshot file is only a change log of the original virtual disk, it creates a place holder disk, virtual_machine-00000x-delta. vmdk, to store data changes since the time the snapshot was created.

Can I use a snapshot as a backup? ›

Snapshots are not backups. It is dangerous to consider VM snapshots an actual backup copy of data. While many backup products use snapshots as part of a feature set, a snapshot alone is not a backup.

Can Veeam Backup ESXi free version? ›

Yes you can. You can add standalone ESXI hosts instead of a vCenter to Veeam B&R.

How to backup VMware to external hard drive? ›

How to export VM to OVF and store in external hard drive
  1. Access to VMware ESXi web client, navigate to Virtual Machines page and power off the VM you want to backup.
  2. Right-click on the VM name and select Export.
  3. Click OK to download the . ...
  4. Specify the external hard drive as the destination location, and click Save.
Mar 8, 2023

What is full VM backup? ›

A full VM backup stores a backup copy of all virtual disk images and configuration information for a virtual machine. Full VM backups enable a complete restore of a virtual machine, but they take more time and more server space than a file-level or incremental backup.

Does a VM need to be powered off to clone it? ›

You can clone virtual machines without having to create a template or a snapshot first. The Clone VM button is disabled while virtual machines are running; you must shut down a virtual machine before you can clone it.

What happens when a VM runs out of memory? ›

If a Hyper-V virtual machine ran out of memory, you cannot start your virtual machine or create a new VM. Troubleshooting in Hyper-V virtual machines takes up a lot of time and causes financial loss for business. So you should back up Hyper-V to protect data from security threats.

Is an OVF a backup? ›

Both OVA file and OVF file are the template of VM which contains the full data of VM including its configuration, disk image, and other data. They are often used for data backup and migration.

How do I get OVF from ESXi? ›

How to export VM from ESXi host?
  1. Login to ESXi host via a web browser.
  2. Power off the VM you would like to export.
  3. Right-click on the VM and select Export.
  4. Check .vmdk file (.ovf and .mf files are often checked by default)
  5. Click Export. Download would restart. Find the files where your web browser stores files.
Jan 19, 2023

How to export ESXi VM to OVA? ›

Check below steps to Export VM(Virtual Machine) as a ova or ovf.
  1. Login to vSphere web client. Click on Hosts & Clusters.
  2. Choose the correct Virtual machine which you want to export.
  3. Right Click on virtual machine > Template > Export OVF Template.
  4. Export OVF Template wizard will open :- First provide the name.

How do I backup my host server? ›

Method 1. Backup Hyper-V VMs with Windows Server Backup
  1. Open Server Manager. ...
  2. Add Roles and Features Wizard will pop up. ...
  3. Select Role-based or feature-based installation and click Next.
  4. Select Select a server from the server pool and click Next.
  5. In Features, check Windows Server Backup and click Next.
  6. Click Install.
Feb 11, 2023

How to move VMs between ESXi Hosts without shared storage? ›

Moving a VM when the hosts do not have shared storage
  1. Select the VM from the Inventory.
  2. Right-click the VM and click Clone.
  3. Select the destination ESXi host.
  4. Power off the VM on the source host.
  5. Power on the VM on the destination ESXi host.
May 14, 2020

How do I clone my ESXi SD card? ›

Write the image to a SD Card or USB flash drive with usbit (Windows Host)
  1. Download USB Image Tools.
  2. Open USB Image Tool (Requires Administrator Privileges)
  3. Select your Device and click Restore.
  4. Locate and open the Image File.
  5. Wait until the process finishes. You do now have a 100% copy of your ESXi Host.
Dec 17, 2014

What is the difference between VM snapshot delete and consolidate? ›

Deleting a snapshot does not change the virtual machine or other snapshots. Deleting a snapshot consolidates the changes between snapshots and previous disk states and writes all the data from the delta disk that contains the information about the deleted snapshot to the parent disk.

What is the difference between back up data and sync? ›

Cloud backup saves a copy of data on remote storage to protect it from undesired events, at the same time cloud storage is designed for getting access to data from anywhere. Cloud sync lets multiple users work with data remotely using any number of devices and synchronize changes across all the users involved.

What is Altaro VM backup? ›

VM Backup (formerly Altaro VM Backup) is a fast, affordable, high-performance backup and replication solution. We've cut the waste and hassle to give you an agile, streamlined solution that is easy to implement and feature-rich, with outstanding 24/7 support as part of the package.

What are the 3 forms of backup solutions? ›

There are mainly three types of backup: full, differential, and incremental.

What are four common backup solutions? ›

The most common backup types are a full backup, incremental backup and differential backup. Other backup types include synthetic full backups and mirroring. In the debate over cloud vs. local backup, there are some types of backup that are better in certain locations.

Which backup technique is most efficient? ›

Incremental backups are the most space-efficient form of backup.

How do I backup a VMware VM? ›

Method 1. Backup VMDK file of ESXi VM
  1. Right-click the VM and select Edit Settings.
  2. Expand the Hard disk and then you can find the location of .vmdk file of the VM.
  3. Click Files on the right.
  4. Click COPY TO.
  5. Right-clik the VM and select Template.
  6. Select Export OVF Template.
  7. Give a name to the task and click OK.
Jan 31, 2023

What type of backups are commonly used with virtual machines? ›

VM backup concepts

Differential backup – Backup of only the files that have changed since the last full backup. File-level backup – Backup that is defined at the level of files and folders. Full backup – A backup of all files.

What is the difference between backup and clone? ›

There's a big difference between clone and backup. A backup disk creates an image file. You can use this to recover data if there's an emergency. Cloning copies data from one hard disk to another, if you want to change the drive.

What is the difference between snapshot and VMDK? ›

A VMware snapshot is a copy of the virtual machine's disk file (VMDK) at a given point in time. Snapshots provide a change log for the virtual disk and are used to restore a VM to a particular point in time when a failure or system error occurs. Snapshots alone do not provide backup.

What is the difference between ESXi snapshot and backup? ›

The main difference between snapshots and backups is that the latter is isolated from the mainframe. That means snapshot copies are stored on the original network, unlike backup copies. Snapshots work well for frequent protection measured in minutes or hours while backups are used for regular protection.

Is a VM snapshot a backup? ›

VM snapshots are a simple and effective way to roll a virtual machine back to a point in time. Mistakenly, some still view snapshots as a backup because they allow a VM to return to a previous state. Snapshots are not backups. It is dangerous to consider VM snapshots an actual backup copy of data.

Why snapshot is not a backup? ›

Storage-based snapshot technologies serve a different purpose compared to backup and data protection solutions. Since snapshots reside on the same array as the production database, they are vulnerable to array failures and thus should not be considered valid "backups" of the data.

What happens when you clone a VM with snapshots? ›

A snapshot preserves the current state of a virtual machine, copying the VM's disk file. It is used for backup purposes. If you need to save the configuration of a virtual machine so you can revert back to it later if something goes awry, create a snapshot. A clone, by contrast, is an entirely separate copy of the VM.

Are snapshots a valid alternative to backing up virtual machines? ›

Snapshots are another alternative to backing up virtual machines. Because of the simplicity of the process, most clones of virtual machines are created by hand. When using snapshots, you can incorporate changes made into the base virtual machine by merging snapshots.

What are the disadvantages of snapshot in VMware? ›

Snapshots can negatively affect the performance of a virtual machine. Performance degradation is based on how long the snapshot or snapshot tree is in place, the depth of the tree, and how much the virtual machine and its guest operating system have changed from the time you took the snapshot.

Why should you take a snapshot of a VM? ›

Snapshots can be used for development and testing purposes. It can be considered as a quick failsafe to be able to rollback before a patch performing tests on certain applications residing on VM.

Do I need to shutdown the VM before taking a snapshot? ›

If you want to use a snapshot to create a new VM, ensure that you first cleanly shut down the VM. This action clears any processes that are in progress.

Can you take a snapshot of a running VM? ›

The VMware snapshot preserves the state and data of the VM at the current point in time, so when you are done testing, you can quickly revert the VM back to a desired state. You can create a snapshot file with or without memory. A memory snapshot also captures the memory state of the VM and its power settings.

How to take snapshot backup in VMware? ›

To take a snapshot in the vSphere Web Client:
  1. Right-click the virtual machine in the inventory and click Take Snapshot. ...
  2. Enter a name for the snapshot.
  3. Enter a description for the snapshot. ...
  4. Select the Snapshot the virtual machine's memory option to capture the memory of the virtual machine.
Mar 21, 2021

References

Top Articles
Latest Posts
Article information

Author: Pres. Carey Rath

Last Updated: 01/08/2024

Views: 5745

Rating: 4 / 5 (61 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Pres. Carey Rath

Birthday: 1997-03-06

Address: 14955 Ledner Trail, East Rodrickfort, NE 85127-8369

Phone: +18682428114917

Job: National Technology Representative

Hobby: Sand art, Drama, Web surfing, Cycling, Brazilian jiu-jitsu, Leather crafting, Creative writing

Introduction: My name is Pres. Carey Rath, I am a faithful, funny, vast, joyous, lively, brave, glamorous person who loves writing and wants to share my knowledge and understanding with you.