Home VM Backup How to Schedule Backup for vCenter and ESXi VM?

How to Schedule Backup for vCenter and ESXi VM?

2024-04-11 | Nick Zhao

Table of contents
  • How to schedule a vCenter backup?
  • How to perform scheduled ESXi VM backup with ghettoVCB?
  • How to easily schedule ESXi VM backup with Vinchin Backup & Recovery?
  • ESXi scheduled backup FAQs
  • Sum Up
Are you looking for a robust VM backup solution? Try Vinchin Backup & Recovery!↘ Download Free Trial

ESXi virtual machines are widely used in home labs and companies for test and production environments because virtual environments save resources and facilitate centralized management.

Like backing up physical machines, virtual machines also need to backed up so you can protect the important production data or quickly deploy new environments from templates. The common methods of VM backup include manually exporting VM and running backup commands.

However, manually backing up virtual machines is inconvenient, especially when there are many virtual machines, so setting up scheduled backup tasks for virtual machines can greatly reduce the time spent on backups. Of course, if you want to further shorten the backup window, you’d better choose professional backup software.

In VMware environment, you can choose to backup the vCenter, ESXi host configuration, or virtual machines. Among them, it is recommended to manually backup ESXi host configuration because it is much less important and it will be hard to write the script for scheduled backup. Therefore, this post will introduce how to backup vCenter and virtual machine regularly.

How to schedule a vCenter backup?

1. Log in to vCenter Server Management Interface as root

2. Click Backup in the left menu

3. Click Configure

4. Then fill in the backup location > user name > password

5. Set up the schedule

6. Encrypt the backup or not

7. Set up the backup retention policy

8. Select Stats, Events, and Tasks

9. Click Create

vCenter Backup Schedule

Note: If you find Schedule option is not available or the Create button is grey out, you can click Backup Now to create a backup of vCenter first and then try clicking Configure to set up the schedule again.

How to perform scheduled ESXi VM backup with ghettoVCB?

GhettoVCB is a common script for ESXi VM backup. It will take VM snapshot, backup the VM then, and delete the snapshot at last as the mainstream backup software does.

You can download ghettoVCB from VCB from Github, upload it to datastore added in vCenter, and then install it with command. You can refer to our step-to-step guide for using ghettoVCB.

The common backup command is

./ghettoVCB.sh -f [VM_BACKUP_UP_LIST] -c [VM_CONFIG_DIR] -l [LOG_FILE] -d [DEBUG_LEVEL] -g [GLOBAL_CONF] -e [VM_EXCLUSION_LIST]

OPTIONS:

-a   Backup all VMs on the host

-f    List of VMs to backup  

-c    VM configuration directory for VM backups

-g    Path to global ghettoVCB configuration file

-l     File to output logging

-d    Debug level [info|debug|dryrun] (default: info)

You need to manually run the script to backup ESXi VM but if you would like to set schedule VM backup, you can create a cron job to call the call script like

/bin/echo "0 12 * * 0 /vmfs/volumes/backup_disk/ghettoVCB/start_bak.sh" >> /var/spool/cron/crontabs/root

It means triggering VM backup once every Sunday.

How to easily schedule ESXi VM backup with Vinchin Backup & Recovery?

Virtual machines are the most important parts of virtual environment and backing up virtual machines can protect important production data. It is worth to select a better backup solution for them.

Vinchin Backup & Recovery is a professional VM backup and disaster recovery solution for various virtualization platforms including VMware, Hyper-V, Proxmox, XenServer, XCP-ng, oVirt, RHV, OLVM, OpenStack, etc.

It makes it quick to deploy the backup system and add all the VMs with agentless backup and lets you easily schedule ESXi VM backup. In addition, it provides disaster recovery solutions like VM instant recovery, restoring VM from its backup in 15 seconds, and offsite backup. If you need to switch to new virtual environment, it can also help perform easy V2V migration.

You can easily create a scheduled VM backup in 4 steps.

1. Select the ESXi VM

Select ESXi VM

2. Select the backup storage

Select Backup Storage

3. Select strategies. Here you can select to backup VM daily, weekly, or monthly.

Set Backup Schedule

4. Submit the job

Submit the Job

Vinchin Backup & Recovery has helped many companies backup VMware VMs and you can also start a 60-day full-featured free trial here to see how suitable it is for VMware. If you need any help, contact us at any moment. If you would like to do a local business, you can select a local partner here.

ESXi scheduled backup FAQs

1. Is it possible to schedule backups the entire ESXi host like Windows or Linux server?

It will be hard to perform host-level backup for ESXi host because there is no mainstream OS installed on the host so you can’t perform OS-level backup for it. In addition, virtual machines always work independently, so performing guest-level backup will be better.

2. Can you set up a retention policy for ESXi backup at the same time?

As mentioned in this post, you can set up the retention policy for vCenter configuration in vCenter Appliance Management Console and for VMs in Vinchin Backup & Recovery.

Sum Up

Regularly scheduling backup for vCenter server and ESXi VM is essential for protecting virtual environment against data loss. To save time when managing a large environment, you can set up schedules for ESXi backup jobs.

Vinchin Backup & Recovery is a excellent backup solution for ESXi VM so don’t miss the free trial.

Share on:

Categories: VM Backup
You May Also Like...