VM Backup Plugin


Recommended Posts

On 3/25/2021 at 3:03 PM, jlficken said:


I get this error:

 

+==============================================================================
| Skipping package vmbackup-v0.2.3-2021.03.11 (already installed)
+==============================================================================


This is something I found right after the last release. It will be fixed in the next version. Glad you figured it out though.

If anyone else runs into this, you can also fix it by running this from the terminal (which will force the vmbackup plugin to fully uninstall).
 

removepkg vmbackup*

 

Link to comment

Hi i'm new to the forum, thanks for your job!

This is indeed an useful plugin, installed and run seamlessy just reading github readme.

Now simple question, i cannot find nowhere similar easy instructions for restore procedure. 

How to do that?

I guess is quite easy but... i would like to test the full procedure :-)
Thanks again!

Link to comment

how do you find out what the error is when it runs and tells you there is an error.. really there is nothing in this error log to tell me exactly whats wrong.. says no error then says there is error..   

well whats error?  so i confused? and how you fix it  and where is the incremental file list?


2021-04-04 03:36:01 information: copy of /mnt/user/Backup Files/VMs Backup/Windows 98/20210328_0000_win98.qcow2 to /mnt/user/Backup Files/VMs Backup/Windows 98/20210404_0000_win98.qcow2 complete.
2021-04-04 03:36:01 information: skip_vm_shutdown is false. beginning vm shutdown procedure.
2021-04-04 03:36:01 information: Windows 98 is shut off. vm desired state is shut off. can_backup_vm set to y.
2021-04-04 03:36:01 information: actually_copy_files is 1.
2021-04-04 03:36:01 information: can_backup_vm flag is y. starting backup of Windows 98 configuration, nvram, and vdisk(s).
sending incremental file list
Windows 98.xml

sent 4,328 bytes received 35 bytes 8,726.00 bytes/sec
total size is 4,217 speedup is 0.97
2021-04-04 03:36:01 information: copy of Windows 98.xml to /mnt/user/Backup Files/VMs Backup/Windows 98/20210404_0000_Windows 98.xml complete.
2021-04-04 03:36:01 information: Windows 98 does not appear to have an nvram file. skipping.
2021-04-04 03:36:01 information: extension for /mnt/user/isos/Microsoft Windows 98 Second Edition/Microsoft Windows 98 Second Edition/Windows 98 Second Edition.iso on Windows 98 was found in vdisks_extensions_to_skip. skipping disk.
sending incremental file list
win98.qcow2

sent 171,501 bytes received 299,973 bytes 188,589.60 bytes/sec
total size is 1,835,139,072 speedup is 3,892.34
2021-04-04 03:36:03 information: copy of /mnt/cache/vms/win98/win98.qcow2 to /mnt/user/Backup Files/VMs Backup/Windows 98/20210404_0000_win98.qcow2 complete.
2021-04-04 03:36:04 information: backup of /mnt/cache/vms/win98/win98.qcow2 vdisk to /mnt/user/Backup Files/VMs Backup/Windows 98/20210404_0000_win98.qcow2 complete.
2021-04-04 03:36:04 information: the extensions of the vdisks that were backed up are qcow2.
2021-04-04 03:36:04 information: vm_state is shut off. vm_original_state is shut off. not starting Windows 98.
2021-04-04 03:36:04 information: backup of Windows 98 to /mnt/user/Backup Files/VMs Backup/Windows 98 completed.
2021-04-04 03:36:04 information: number of days to keep backups set to indefinitely.
2021-04-04 03:36:04 information: number of backups to keep set to infinite.
2021-04-04 03:36:04 information: removing local Windows 98.xml.
removed 'Windows 98.xml'
2021-04-04 03:36:04 information: Windows XP can be found on the system. attempting backup.
2021-04-04 03:36:04 information: creating local Windows XP.xml to work with during backup.
2021-04-04 03:36:04 information: /mnt/user/Backup Files/VMs Backup/Windows XP exists. continuing.
2021-04-04 03:36:04 information: extension for /mnt/user/isos/en_windows_xp_home_with_service_pack_3_x86_cd_x14-92413.ISO on Windows XP was found in vdisks_extensions_to_skip. skipping disk.
2021-04-04 03:36:04 information: extension for /mnt/user/isos/virtio-win-0.1.160-1.iso on Windows XP was found in vdisks_extensions_to_skip. skipping disk.
2021-04-04 03:36:04 information: copy of backup of /mnt/user/Backup Files/VMs Backup/Windows XP/20210328_0000_vdisk1.img vdisk to /mnt/user/Backup Files/VMs Backup/Windows XP/20210404_0000_vdisk1.img starting.
'/mnt/user/Backup Files/VMs Backup/Windows XP/20210328_0000_vdisk1.img' -> '/mnt/user/Backup Files/VMs Backup/Windows XP/20210404_0000_vdisk1.img'
2021-04-04 03:38:37 information: copy of /mnt/user/Backup Files/VMs Backup/Windows XP/20210328_0000_vdisk1.img to /mnt/user/Backup Files/VMs Backup/Windows XP/20210404_0000_vdisk1.img complete.
2021-04-04 03:38:37 information: skip_vm_shutdown is false. beginning vm shutdown procedure.
2021-04-04 03:38:37 information: Windows XP is shut off. vm desired state is shut off. can_backup_vm set to y.
2021-04-04 03:38:37 information: actually_copy_files is 1.
2021-04-04 03:38:37 information: can_backup_vm flag is y. starting backup of Windows XP configuration, nvram, and vdisk(s).
sending incremental file list
Windows XP.xml

sent 4,691 bytes received 35 bytes 9,452.00 bytes/sec
total size is 4,581 speedup is 0.97
2021-04-04 03:38:37 information: copy of Windows XP.xml to /mnt/user/Backup Files/VMs Backup/Windows XP/20210404_0000_Windows XP.xml complete.
2021-04-04 03:38:37 information: Windows XP does not appear to have an nvram file. skipping.
2021-04-04 03:38:37 information: extension for /mnt/user/isos/en_windows_xp_home_with_service_pack_3_x86_cd_x14-92413.ISO on Windows XP was found in vdisks_extensions_to_skip. skipping disk.
2021-04-04 03:38:37 information: extension for /mnt/user/isos/virtio-win-0.1.160-1.iso on Windows XP was found in vdisks_extensions_to_skip. skipping disk.
sending incremental file list
vdisk1.img

sent 26,350,696 bytes received 7,373,283 bytes 130,966.91 bytes/sec
total size is 107,374,182,400 speedup is 3,183.91
2021-04-04 03:42:54 information: copy of /mnt/user/vms/Windows XP/vdisk1.img to /mnt/user/Backup Files/VMs Backup/Windows XP/20210404_0000_vdisk1.img complete.
2021-04-04 03:42:55 information: backup of /mnt/user/vms/Windows XP/vdisk1.img vdisk to /mnt/user/Backup Files/VMs Backup/Windows XP/20210404_0000_vdisk1.img complete.
2021-04-04 03:42:55 information: the extensions of the vdisks that were backed up are img.
2021-04-04 03:42:55 information: vm_state is shut off. vm_original_state is shut off. not starting Windows XP.
2021-04-04 03:42:55 information: backup of Windows XP to /mnt/user/Backup Files/VMs Backup/Windows XP completed.
2021-04-04 03:42:55 information: number of days to keep backups set to indefinitely.
2021-04-04 03:42:55 information: number of backups to keep set to infinite.
2021-04-04 03:42:55 information: removing local Windows XP.xml.
removed 'Windows XP.xml'
2021-04-04 03:42:55 information: finished attempt to backup webserver, Windows Server 2016, 2. Volumio, 1. Hass, 1. caller id, 1.v, FreeBSD, hassass, home assistant Hasso, Landon's - Ubuntu, Landon's - Windows 10, Landon's - Windows XP, LibreELEC, Linux, Linux Lite, OpenELEC, OpenSUSE, Ubuntu, Webserver (192.168.0.30) Server 2019, Windows 10, Windows 7 32 bit, Windows 98, Windows XP to /mnt/user/Backup Files/VMs Backup.
2021-04-04 03:42:55 information: cleaning out logs over 1.
2021-04-04 03:42:55 information: removed '/mnt/user/Backup Files/VMs Backup/logs/20210328_0000_unraid-vmbackup.log'.
2021-04-04 03:42:55 information: cleaning out error logs over 10.
2021-04-04 03:42:55 information: did not find any error log files to remove.
2021-04-04 03:42:55 warning: errors found. creating error log file.
sending incremental file list
20210404_0000_unraid-vmbackup.log

sent 71,278 bytes received 35 bytes 142,626.00 bytes/sec
total size is 71,136 speedup is 1.00
2021-04-04 03:42:55 Stop logging to log file.
2021-04-04 03:42:55 Stop logging to error log file.
2021-04-04 03:42:55 Found /tmp/vmbackup/scripts/default.pid. Attempting to kill process.
2021-04-04 03:42:55 Killed user script with pid 2265 for default.
2021-04-04 03:42:55 Removed: /tmp/vmbackup/scripts/default/user-script.sh
2021-04-04 03:42:55 Removed: /tmp/vmbackup/scripts/default.pid

 

Link to comment

running on unraid 6.8.3 and vm backup 2021.3.11

 

set to run ever saturday night. looking through my files it looks like it hasnt actually done a backup since december of last year. if i go to the script and i select to run backup i get the notifiaction fairly quickly that it has finished but no new backup. attaching my log file.

 

 

 

 

 

2021-04-04 08:25:25 Start logging to log file.
2021-04-04 08:25:25 information: send_notifications is 1. notifications will be sent.
2021-04-04 08:25:25 information: only_send_error_notifications is 0. normal notifications will be sent if send_notifications is enabled.
2021-04-04 08:25:31 information: keep_log_file is 1. log files will be kept.
2021-04-04 08:25:31 information: number_of_log_files_to_keep is 1. this is probably a sufficient number of log files to keep.
2021-04-04 08:25:31 information: enable_vm_log_file is 0. vm specific logs will not be created.
2021-04-04 08:25:31 information: backup_all_vms is 1. vms_to_backup will be ignored. all vms will be backed up.
2021-04-04 08:25:31 information: use_snapshots is 0. vms will not be backed up using snapshots.
2021-04-04 08:25:31 information: kill_vm_if_cant_shutdown is 0. vms will not be forced to shutdown if a clean shutdown can not be detected.
2021-04-04 08:25:31 information: set_vm_to_original_state is 1. vms will be set to their original state after backup.
2021-04-04 08:25:31 information: number_of_days_to_keep_backups is 0. backups will be kept indefinitely. be sure to set number_of_backups_to_keep to keep backups storage usage down.
2021-04-04 08:25:31 information: number_of_backups_to_keep is 3. this is probably a sufficient number of backups to keep.
2021-04-04 08:25:31 information: inline_zstd_compress is 0. vdisk images will not be inline compressed.
2021-04-04 08:25:31 information: pigz_compress is 0. backups will not be post compressed.
2021-04-04 08:25:31 information: use_snapshots disabled, not adding snapshot_extension to vdisk_extensions_to_skip.
2021-04-04 08:25:31 information: snapshot_fallback is 0. snapshots will fallback to standard backups.
2021-04-04 08:25:31 information: pause_vms is 0. vms will be shutdown for standard backups.
2021-04-04 08:25:31 information: enable_reconstruct_write is 0. reconstruct write will not be enabled by this script.
2021-04-04 08:25:31 information: compare_files is 0. files will not be compared after backups.
2021-04-04 08:25:31 information: backup_xml is 1. vms will have their xml configurations backed up.
2021-04-04 08:25:31 information: backup_nvram is 1. vms will have their nvram backed up.
2021-04-04 08:25:31 information: backup_vdisks is 1. vms will have their vdisks backed up.
2021-04-04 08:25:31 information: start_vm_after_backup is 0. vms will not be started following successful backup.
2021-04-04 08:25:31 information: start_vm_after_failure is 0. vms will not be started following an unsuccessful backup.
2021-04-04 08:25:31 information: disable_delta_sync is 0. rsync will be used to perform delta sync backups.
2021-04-04 08:25:31 information: rsync_only is 0. cp will be used when applicable.
2021-04-04 08:25:31 information: actually_copy_files is 1. files will be copied.
2021-04-04 08:25:31 information: clean_shutdown_checks is 20. this is probably a sufficient number of shutdown checks.
2021-04-04 08:25:31 information: seconds_to_wait is 30. this is probably a sufficient number of seconds to wait between shutdown checks.
2021-04-04 08:25:31 information: keep_error_log_file is 1. error log files will be kept.
2021-04-04 08:25:31 information: number_of_error_log_files_to_keep is 10. this is probably a sufficient error number of log files to keep.
2021-04-04 08:25:31 information: started attempt to backup 001 Windows 10, 002 Windows 10, 003 Windows 10, Backup DNS, CentOS, Debian 002, Macinabox BigSur, Ubuntu to /mnt/user/Drive Backups/VM Backups/Automatic Backups
2021-04-04 08:25:31 information: 001 Windows 10 can be found on the system. attempting backup.
2021-04-04 08:25:31 information: removing old local 001 Windows 10.xml.
2021-04-04 08:25:31 information: creating local 001 Windows 10.xml to work with during backup.
2021-04-04 08:25:31 information: /mnt/user/Drive Backups/VM Backups/Automatic Backups/001 Windows 10 exists. continuing.
2021-04-04 08:25:31 information: finished attempt to backup 001 Windows 10, 002 Windows 10, 003 Windows 10, Backup DNS, CentOS, Debian 002, Macinabox BigSur, Ubuntu to /mnt/user/Drive Backups/VM Backups/Automatic Backups.
2021-04-04 08:25:31 information: cleaning out logs over 1.
2021-04-04 08:25:31 information: removed '/mnt/user/Drive Backups/VM Backups/Automatic Backups/logs/20210404_0812_unraid-vmbackup.log'.
2021-04-04 08:25:31 information: cleaning out error logs over 10.
2021-04-04 08:25:31 information: did not find any error log files to remove.
2021-04-04 08:25:31 Stop logging to log file.

Edited by itskamel
Link to comment
  • 2 weeks later...

I've sat here for a while and took me some days to finish reading ALL the posts so far. 

First of all I want to thank and congratulate @JTok for making this plug in. And I wish you the best from now on. I've read that you don't have a test server. Feel free to tell me and I can grant you access in mine should you want to run some tests.

 

However I'm backing up Win 2012 Server, Win 7 and win 10 VMs. And sometimes the backup is done and some it is not. 

I've installed the plugin a couple of weeks ago and I'm in a run test phase. I found in the logs that the problem is that the VMs are not being shut properly and when that happens the vm is not backed up. I don't know if you could point me in some direction in order to start looking I would really appreciate it.

 

TIA!

 


 

  • Like 1
Link to comment

i hear ya i found out with parity  problems everytime unraid reboots   its due to VMs not shutting down  basiclly my 2 Windows Server..

another guy told me to try setting up  in VMs Manager under Advanced..  change the Shutdown  to   Hibernate  and then you need to install KVM Guest    on VMs     

its supposed to shut them down faster..  as i have  parity checks everytime i reboot due to VMS not shutting down.. and my 2 windows Vms  dont back up anymore with the latest Unraid  its problem a bug  why it doesnt backup either..

 

so you could try it.. i even tried uninstalling VM Backup  and it didnt solve.. so   i waiting for a latest fix.. and gonna try this KVM Guest and with the Shutdown set to Hibernation

 

 

Link to comment

ya it doesnt help latest unraid 6.9.2 has a bug in the OS  that causes parity check and unsafe shutdowns

 

i in the middle trying to get kvm guest  to see if  it will fix the VMBackup errors as it only has a problem with Windows Server  and Unraid 6.9.2  hosting it.. it didnt have a problem in previous unraids 

sp tjos bug must be affecting vmbackups too

 

if Windows Vms are running  doesnt affect any stopped vms

 

 

and doing that set 420 seconds disk settings and 300 seconds vms  did not work  just took lot longer to start up and still created unclean shut down and parity checking started

Link to comment
  • 2 weeks later...

Does the plugin only back up the vdisk files for a VM or does it back up the XML (and potentially BIOS) files that are stored in the libvirt image?   If not I would think adding this should be easy and it would definitely make restoring a VM much easier.

Link to comment
2 hours ago, itimpi said:

Does the plugin only back up the vdisk files for a VM or does it back up the XML (and potentially BIOS) files that are stored in the libvirt image?

 

Looks like it backs up all of them. See log from a recent run (core-backup/domains is the destination directory)

 

2021-04-27 10:41:02 information: Debian is shut off. vm desired state is shut off. can_backup_vm set to y.
2021-04-27 10:41:02 information: actually_copy_files is 1.
2021-04-27 10:41:02 information: can_backup_vm flag is y. starting backup of Debian configuration, nvram, and vdisk(s).
sending incremental file list
Debian.xml

sent 7,343 bytes received 35 bytes 14,756.00 bytes/sec
total size is 7,237 speedup is 0.98
2021-04-27 10:41:02 information: copy of Debian.xml to /mnt/user/core-backup/domains/Debian/20210427_1040_Debian.xml complete.
sending incremental file list
55c212-015b-6fc0-dada-cba0018034_VARS-pure-efi.fd

sent 131,246 bytes received 35 bytes 262,562.00 bytes/sec
total size is 131,072 speedup is 1.00
2021-04-27 10:41:02 information: copy of /etc/libvirt/qemu/nvram/55c212-015b-6fc0-dada-cb6ca0018034_VARS-pure-efi.fd to /mnt/user/core-backup/domains/Debian/20210427_1040_55c21fa2-015b-6fc0-dada-cba0018034_VARS-pure-efi.fd complete.
'/mnt/cache/domains/Debian/vdisk1.img' -> '/mnt/user/core-backup/domains/Debian/20210427_1040_vdisk1.img'
2021-04-27 10:42:19 information: copy of /mnt/cache/domains/Debian/vdisk1.img to /mnt/user/core-backup/domains/Debian/20210427_1040_vdisk1.img complete.
2021-04-27 10:42:19 information: backup of /mnt/cache/domains/Debian/vdisk1.img vdisk to /mnt/user/core-backup/domains/Debian/20210427_1040_vdisk1.img complete.
2021-04-27 10:42:19 information: extension for /mnt/user/isos/debian-10.3.0-amd64-netinst.iso on Debian was found in vdisks_extensions_to_skip. skipping disk.
2021-04-27 10:42:19 information: the extensions of the vdisks that were backed up are img.
2021-04-27 10:42:19 information: vm_state is shut off. vm_original_state is running. starting Debian.
Domain Debian started

2021-04-27 10:42:20 information: backup of Debian to /mnt/user/core-backup/domains/Debian completed.

 

Link to comment
  • 3 weeks later...
  • 2 weeks later...

Hi,

 

Great job already.


I just have a rather simple question, but I can't see the answer on my own...
In the field "Number of days to keep backups" you have to enter a number of days in figures ?
Because as soon as I put a number different from 0 I can't validate the change of settings ...

 

Rémi

image.png

Link to comment
  • 2 weeks later...

This works great for Linux vms, but I'm seeing an issue with Windows 10 vm ...

 

error: internal error: unable to execute QEMU agent command 'guest-fsfreeze-freeze': failed to add C:\ to snapshot set:

 

full log:

Windows 10.xml

sent 6,049 bytes received 35 bytes 12,168.00 bytes/sec
total size is 5,939 speedup is 0.98
2021-06-19 12:02:00 information: copy of Windows 10.xml to /mnt/user/backups/Windows 10/20210619_1202_Windows 10.xml complete.
sending incremental file list
c15ed305-5492-a7c9-e457-92e090f81d25_VARS-pure-efi.fd

sent 131,247 bytes received 35 bytes 262,564.00 bytes/sec
total size is 131,072 speedup is 1.00
2021-06-19 12:02:00 information: copy of /etc/libvirt/qemu/nvram/c15ed305-5492-a7c9-e457-92e090f81d25_VARS-pure-efi.fd to /mnt/user/backups/Windows 10/20210619_1202_c15ed305-5492-a7c9-e457-92e090f81d25_VARS-pure-efi.fd complete.
2021-06-19 12:02:00 information: able to perform snapshot for disk /mnt/user/domains/Windows 10/vdisk1.img on Windows 10. use_snapshots is 1. vm_state is running. vdisk_type is raw
2021-06-19 12:02:00 information: qemu agent found. enabling quiesce on snapshot.
error: internal error: unable to execute QEMU agent command 'guest-fsfreeze-freeze': failed to add C:\ to snapshot set:

2021-06-19 12:02:00 failure: snapshot command failed on vdisk1.snap for Windows 10.
2021-06-19 12:02:00 failure: snapshot_fallback is 0. skipping backup for Windows 10 to prevent data loss. no cleanup will be performed for this vm.
2021-06-19 12:02:00 information: Ubuntu can be found on the system. attempting backup.
2021-06-19 12:02:00 information: creating local Ubuntu.xml to work with during backup.
2021-06-19 12:02:00 information: /mnt/user/backups/Ubuntu exists. continuing.
2021-06-19 12:02:00 information: skip_vm_shutdown is false and use_snapshots is 1. skipping vm shutdown procedure. Ubuntu is running. can_backup_vm set to y.
2021-06-19 12:02:00 information: actually_copy_files is 1.
2021-06-19 12:02:00 information: can_backup_vm flag is y. starting backup of Ubuntu configuration, nvram, and vdisk(s).
sending incremental file list

 

I can confirm qemu agent is installed and running:

 

image.png.85d529fade52680727b23118c3837558.png

Link to comment
  • 2 weeks later...

Hey @JTok, just started using this plugin. Awesome work. I was going to check whether I should start writing small script for myself, using snapshots for my VMs, but then I found your plugin.

 

Good stuff really. Found out, that "Number of days to keep backups" must be 0, or higher/equal 7. 1-6 are not working, its not in the specified format.

Went through the code, figured out in line 1419

elif [ "$number_of_days_to_keep_backups" -ge 7 ] && [ "$number_of_days_to_keep_backups" -le 180 ]; then

Why have you configured 7 as the minimum? I mean, makes sense for backups really, but image someone linke my who wants to test it first, see if stuff gets deleted after one day, and then let it run automatically.

Something you may want to consider to change?

 

Also I think you miss an exception for deleting potential error logs. Means, you have proper exception for the script not to faul, but the logfil suggest this as an error, wheras I think its fine (or at this point you actually awaiting to find a file?).

find: '/mnt/default_ssd_cache/Backup/Zeus/VMs/logs/*unraid-vmbackup_error.log': No such file or directory
2021-07-02 22:31:19 information: did not find any error log files to remove.

Line 2785

     deleted_files=$(find "$backup_location/$log_file_subfolder"*unraid-vmbackup.log -type f -printf '%T@\t%p\n' | sort -t $'\t' -gr | tail -n +$log_files_plus_1 | cut -d $'\t' -f 2- | xargs -d '\n' -r rm -fv --)

 

Then, unfortunately, after taking the backup, the copy of the file failed, based on the scripts output:

2021-07-02 22:46:33 failure: copy of /mnt/user/VMs/Athene-Server/vdisk1.img to /mnt/default_ssd_cache/Backup/Zeus/VMs/Athene-Server/20210702_2243_vdisk1.img.zst failed.

But I can confirm, the files have been created:

root@Zeus-Server:/mnt/default_ssd_cache/Backup/Zeus/VMs/Athene-Server# ls -lisa
total 30203084
523493        0 drwxrwxrwx 1 root root          308 Jul  2 22:46 ./
522862        0 drwxrwxrwx 1 root root           60 Jul  2 22:43 ../
525076      128 -rw-rw-rw- 1 root users      131072 Jul  2 22:46 20210702_2243_76070b23-2217-0c51-808e-9be6c25b8f0e_VARS-pure-efi.fd
525075        8 -rw-rw-rw- 1 root root         7194 Jul  2 22:46 20210702_2243_Athene-Server.xml
525009  4225000 -rwxrwxrwx 1 root users  4326397656 Jul  2 22:46 20210702_2243_vdisk1.img.zst*
525038 25977948 -rwxrwxrwx 1 root users 26601417527 Jul  2 22:46 20210702_2243_vdisk2.img.zst*

Looking int othe script, lines 203-228 of default-script, youre doing the copy and rely on the error code of rsync and/or copy. As there is no possibility to debug this, I can't really see where the issue is. Can you suggest how I can help on this? Cleaned already the folders up, just to ensure it's really not a permission issue, or an old snap.

 

BTW, are you running incremental snapshots, or everytime full snaps?

And, for those who want/need to use snaps, I think the deletion is a problem in general. See I now have choosen my SSD cache for backups, assuming mover will move them later. You mentioned that "PATH" must not be /mnt/user* so you can only choose the cache or a specifc disk. The latter can cause problems if the disk is full etc.

So question here is, what happens to those files that will be moved by Mover, as the path is no longer "/mnt/mycache". What is preventing you from using "user" or "user0" in the first place?

 

Unsure if this format of feedback suits you, otherwise I can create pull requests on git ;)

 

Best,
IceBoosteR

Edited by IceBoosteR
More content
Link to comment
On 6/19/2021 at 6:14 PM, Ahmad said:

This works great for Linux vms, but I'm seeing an issue with Windows 10 vm ...

 


error: internal error: unable to execute QEMU agent command 'guest-fsfreeze-freeze': failed to add C:\ to snapshot set:

 

full log:


Windows 10.xml

sent 6,049 bytes received 35 bytes 12,168.00 bytes/sec
total size is 5,939 speedup is 0.98
2021-06-19 12:02:00 information: copy of Windows 10.xml to /mnt/user/backups/Windows 10/20210619_1202_Windows 10.xml complete.
sending incremental file list
c15ed305-5492-a7c9-e457-92e090f81d25_VARS-pure-efi.fd

sent 131,247 bytes received 35 bytes 262,564.00 bytes/sec
total size is 131,072 speedup is 1.00
2021-06-19 12:02:00 information: copy of /etc/libvirt/qemu/nvram/c15ed305-5492-a7c9-e457-92e090f81d25_VARS-pure-efi.fd to /mnt/user/backups/Windows 10/20210619_1202_c15ed305-5492-a7c9-e457-92e090f81d25_VARS-pure-efi.fd complete.
2021-06-19 12:02:00 information: able to perform snapshot for disk /mnt/user/domains/Windows 10/vdisk1.img on Windows 10. use_snapshots is 1. vm_state is running. vdisk_type is raw
2021-06-19 12:02:00 information: qemu agent found. enabling quiesce on snapshot.
error: internal error: unable to execute QEMU agent command 'guest-fsfreeze-freeze': failed to add C:\ to snapshot set:

2021-06-19 12:02:00 failure: snapshot command failed on vdisk1.snap for Windows 10.
2021-06-19 12:02:00 failure: snapshot_fallback is 0. skipping backup for Windows 10 to prevent data loss. no cleanup will be performed for this vm.
2021-06-19 12:02:00 information: Ubuntu can be found on the system. attempting backup.
2021-06-19 12:02:00 information: creating local Ubuntu.xml to work with during backup.
2021-06-19 12:02:00 information: /mnt/user/backups/Ubuntu exists. continuing.
2021-06-19 12:02:00 information: skip_vm_shutdown is false and use_snapshots is 1. skipping vm shutdown procedure. Ubuntu is running. can_backup_vm set to y.
2021-06-19 12:02:00 information: actually_copy_files is 1.
2021-06-19 12:02:00 information: can_backup_vm flag is y. starting backup of Ubuntu configuration, nvram, and vdisk(s).
sending incremental file list

 

I can confirm qemu agent is installed and running:

 

image.png.85d529fade52680727b23118c3837558.png

Maybe to use online snapshots you would need to use qcow2 instead of RAW. That would be my first guess.

Link to comment
On 7/2/2021 at 4:40 PM, IceBoosteR said:

Maybe to use online snapshots you would need to use qcow2 instead of RAW. That would be my first guess.

I had to look up the difference between qcow2 and RAW ... thanks for the suggestion.

 

I might give that a try with a fresh Windows VM setup, but, based on my Ubuntu VM, which uses a RAW disk type, and works fine with the agent installed and running, I don't think this is the answer, besides, reading about qcow2 seems to indicate performance hit vs. RAW

Link to comment

hello JTok,

I'm wondering if it would be possible to add a function to split the resulting *.img.zst file into parts of lets say 4GB.
In my case I run an automated backup-job wih rsnapshot to a remote server build with multiple harddrives using mergerfs - and smaller *.img.zst files would help me fill up those harddrives.
(now I have to set a  minfreespace=520G to handle those big *.img.zst files).
thanks a lot for your answer, peter76

Edited by peter76
Link to comment
  • 2 weeks later...

Has anyone figured out how to restore a VM from backup yet?

I just had a cache drive crash and trying to restore a Debian VM that was created from a physical disk using p2v so the VM was on 256G or thereabout.

Now when I try to manually replace the vdisk.img it is about 1G and when I try to boot the vm it fails to boot with a lot of errors like:

Device /dev/vda5 has size of 1584128 sectors which is smaller than corresponding PV size of 249567232 sectors. Was device resized?

 

I have tried to increase the VM disk size from unraid gui but then it first gives a lot of errors:

Failed to connect to lvmetad. Falling back to device scanning.

Then ends on:

/dev/mapper/debian--vg-root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.

After I ran fsck on debian--vg-root it found and fixed a lot of errors and now ends on failed to mount /dev and /run with

"No such file or directory"

So it fails to find init

 

Also my backup folder for this VM contains tar.gz from each of the backup dates with vdisk1.img and the xml but also a vdisk.img in the root directory unzipped that has the exact same timestamp and name but is a lot smaller. 

 

Does anyone have any clue on what I need to do to restore or is the backup file broken?

 

Many thanks! //Zilched

  • Like 1
Link to comment
53 minutes ago, Zilched said:

Has anyone figured out how to restore a VM from backup yet?

I just had a cache drive crash and trying to restore a Debian VM that was created from a physical disk using p2v so the VM was on 256G or thereabout.

Now when I try to manually replace the vdisk.img it is about 1G and when I try to boot the vm it fails to boot with a lot of errors like:


Device /dev/vda5 has size of 1584128 sectors which is smaller than corresponding PV size of 249567232 sectors. Was device resized?

 

I have tried to increase the VM disk size from unraid gui but then it first gives a lot of errors:


Failed to connect to lvmetad. Falling back to device scanning.

Then ends on:


/dev/mapper/debian--vg-root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.

After I ran fsck on debian--vg-root it found and fixed a lot of errors and now ends on failed to mount /dev and /run with

"No such file or directory"

So it fails to find init

 

Also my backup folder for this VM contains tar.gz from each of the backup dates with vdisk1.img and the xml but also a vdisk.img in the root directory unzipped that has the exact same timestamp and name but is a lot smaller. 

 

Does anyone have any clue on what I need to do to restore or is the backup file broken?

 

Many thanks! //Zilched

I wish someone could answer this...great tool except this one issue!!!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.