
Previously, we explained how to manually back up your virtual machines.
In this tutorial, you'll see how to automatically back up your virtual machines (XML configuration files and virtual hard disks).
To begin, go to the "Shares" tab and click on: Add share.

Configure these settings:
Then, click on: Add share.

Then, at the bottom of the page, select "Export: No" and click Apply.
This will prevent this share from being accessible over the network.
The script will run locally on your Unraid server, so this share does not need to be accessible over the network.

Your new "vms_auto_backups" share appears.

On the Unraid forum, you'll find a thread titled "unraid-autovmbackup: automate backup of virtual machines in unRAID - v0.4".
In this thread, you'll find information about the script used, as well as a download link at the end of the post.

Click on the GitHub link at the end of this post and you will arrive at the page : GitHub - danioj/unraid-autovmbackup: automatically backup kvm virtual machines and configuration.

On the GitHub site that appears, click on: Code -> Download ZIP.

Unzip the downloaded file.

In the "unraid-autovmbackup-master" folder, you will find the script to use: unraid-autovmbackup-0-4.sh.

Open this file "unraid-autovmbackup-0-4.sh" with notepad and you will see that it is a Linux script (using BASH).

In this script you will first find these variables:
Modify these like this:
Plain Text
official_script_name="script" enabled="1"

Note that all script files for all scripts managed via the "User Scripts" plugin are always named "script" (without an extension).
Hence the name "script" indicated in the script above.
Note: you will add this script to your server later.
It is therefore normal that the "autovmbackup" folder does not yet exist on your Unraid server.

Further in this "unraid-autovmbackup-0-4.sh" script, you will find a "change these variables" section where you can indicate:
Change these variables like this:
Plain Text
backup_location="/mnt/user/vms_auto_backups/" vms_to_backup=" Windows 10 " actually_copy_files="0"
Note: in our case, we want to automatically backup our virtual machine named "Windows 10".

Note: the path "/mnt/user/vms_auto_backups/" specified in the script above refers to the "vms_auto_backup" share you previously created in the "Shares" tab of your Unraid server.
To view the path to this share, click the icon to the right of it.

The path to this sharing appears.

For the name of the virtual machine you want to backup, just look at its name in the "VMS" tab of Unraid.

In this script, you will also find other variables that you can modify if you wish:

Once you have edited this script, save the changes.

NAS 6/24/2026
NAS 11/21/2025
NAS 6/3/2026
NAS 5/6/2026
Pinned content
Contact
® InformatiWeb-Pro.net - InformatiWeb.net 2008-2022 - © Lionel Eppe - All rights reserved.
Total or partial reproduction of this site is prohibited and constitutes an infringement punishable by articles L.335-2 and following of the intellectual property Code.
You must be logged in to post a comment