VM Backup Plugin


Recommended Posts

9 hours ago, BurntOC said:

 

I couldn't leave well enough alone and I tried to install VM Backup from CA over the version I'd installed per my posts a few days ago.  It failed, as the poster above indicated, with various issues from the one he/she described to a md5 check on a file it pulled.  AND, I started seeing the problem you're desribing above.  Unfortunately, if I delete the plugin out of /config/plugins it still won't let me go back to my previous version either.  I'm going to try to delete the vmbackup folder out of plugins and just leave it be until @JTok has some time to put that new version out.  Too many hiccups at the moment.

 

I rebooted my server and the problems disappeared. Also the icon of VM Backup in "settings" disappeared. At the moment I will not install it again. 

Link to comment

now i get the following error and vmbackup is gone

 

+==============================================================================
| Installing new package /boot/config/plugins/vmbackup/vmbackup-v0.2.2-2021.02.03.txz
+==============================================================================

Verifying package vmbackup-v0.2.2-2021.02.03.txz.
Installing package vmbackup-v0.2.2-2021.02.03.txz:
PACKAGE DESCRIPTION:
Package vmbackup-v0.2.2-2021.02.03.txz installed.
plugin: run failed: /bin/bash retval: 126

Updating Support Links

Link to comment

There's an issue with one of your page files on 6.9 where simply having the plugin installed corrupts and makes the entire webUI unusable

 

 

The "blank" area is because of 

<br />
<b>Warning</b>:  syntax error, unexpected '=' in Unknown on line 13
 in <b>/usr/local/emhttp/plugins/dynamix/include/PageBuilder.php</b> on line <b>34</b><br />
<br />
<b>Warning</b>:  syntax error, unexpected '=' in Unknown on line 13
 in <b>/usr/local/emhttp/plugins/dynamix/include/PageBuilder.php</b> on line <b>34</b><br />
<br />
<b>Warning</b>:  syntax error, unexpected '$' in Unknown on line 17
 in <b>/usr/local/emhttp/plugins/dynamix/include/PageBuilder.php</b> on line <b>34</b><br />

Which only happens when the VM plugin is installed.  Unfortunately those line numbers don't really refer to anything in particular due to how PageBuilder.php actually works, but process of elimination points right at one of the .page files

Link to comment

The problem with the GUI corruption is that a couple of the .page files are saved in Windows format, not Linux (ie: \r\n instead of \n)

 

Couple other issues is that every .page file has to have Menu="vmbackup:x" and not Menu="Vmbackup:x"

Link to comment
14 minutes ago, danielpiccoli said:

I guess we`re stuck with it until a proper release, just saw this on the GIT

 

That got changed awhile ago.

 

On 3/2/2021 at 1:20 PM, JTok said:

In light of the official release of 6.9.0 I have removed the max version restriction. I am not able to confirm how well it works this week because I am moving across several time-zones.

 

But, the error code sometimes being returned is a different issue (It appears to happen if the plugin is already installed)  Solution appears to be to uninstall the plugin, reboot then reinstall.  The bigger problem is that 2021.02.03 doesn't actually work and causes display corruption, etc.

Link to comment

Dang. Sorry for the issues with the latest version. I wasn’t having them on my server (although mine was still on 6.8.3), but I must have messed something up when I uploaded the latest version to GitHub.

I am arriving at my new place this afternoon, so I’ll update my server and try to get a fix out tonight.


Sent from my iPhone using Tapatalk

  • Like 2
  • Thanks 2
Link to comment
21 hours ago, JTok said:

Dang. Sorry for the issues with the latest version. I wasn’t having them on my server (although mine was still on 6.8.3), but I must have messed something up when I uploaded the latest version to GitHub.

I am arriving at my new place this afternoon, so I’ll update my server and try to get a fix out tonight.


Sent from my iPhone using Tapatalk


Nice ! appreciate your work and the amazing plugin !  on a side note - mind-blown with your server (vetinari) specs - omg! haha

Link to comment

I just wanted to check in and say I am still working on this. Unfortunately my new ISP couldn’t get my Internet going yesterday, and had to schedule another appointment for earlier today. Which meant I wasn’t able to start on this until now.

Hopefully it is a quick fix


Sent from my iPhone using Tapatalk

  • Like 2
Link to comment
On 3/6/2021 at 12:18 PM, malac said:

now i get the following error and vmbackup is gone

 

+==============================================================================
| Installing new package /boot/config/plugins/vmbackup/vmbackup-v0.2.2-2021.02.03.txz
+==============================================================================

Verifying package vmbackup-v0.2.2-2021.02.03.txz.
Installing package vmbackup-v0.2.2-2021.02.03.txz:
PACKAGE DESCRIPTION:
Package vmbackup-v0.2.2-2021.02.03.txz installed.
plugin: run failed: /bin/bash retval: 126

Updating Support Links

 

I get the same error when installing VM BACKUP - on Unraid 6.9 and now on 6.9.1
 

Link to comment
4 minutes ago, peter76 said:

I get the same error when installing VM BACKUP - on Unraid 6.9 and now on 6.9.1

 

8 hours ago, JTok said:

Which meant I wasn’t able to start on this until now.

 

On 3/7/2021 at 9:43 AM, Squid said:

The bigger problem is that 2021.02.03 doesn't actually work and causes display corruption, etc.

 

Link to comment

I finally found the issue. For some reason, several of the files had their EOL character changed when I pushed the last update (I'm blaming GitHub).

 

As long as you have removed the broken version this should work.

If you get an error saying that the plugin is already installed when you try to install this version, you will need to remove the the old version.

 

If you have already removed the old version and are still getting an error saying that the plugin is already installed, run the following terminal command and try again.

removepkg vmbackup*

 

Edited by JTok
Link to comment
6 hours ago, JTok said:

As long as you have removed the broken version this should work.

 

Thanks for the fix

 

Trouble though with what you've done is that many users may not be aware of the issue (ie: the plugin may have auto updated), and if at some point when they do check out the webUI they'll have the issues on a version  of the plugin which is already fixed.  

 

Why not bump the version of the plugin so that every version to avoid any issues?

  • Like 1
Link to comment
6 hours ago, JTok said:

I finally found the issue. For some reason, several of the files had their EOL character changed when I pushed the last update (I'm blaming GitHub).

 

As long as you have removed the broken version this should work.

If you get an error saying that the plugin is already installed when you try to install this version, you will need to remove the the old version.

 

If you have already removed the old version and are still getting an error saying that the plugin is already installed, run the following terminal command and try again.


removepkg vmbackup*

 

 

Just wondering/asking (I've been following these issues):

 

Should this be in the release notes of a new version on GitHub for better visibility?

 

  

8 minutes ago, Squid said:

Why not bump the version of the plugin so that every version to avoid any issues?

 

I agree, this seems like a good way forward.

Edited by KptnKMan
Link to comment
2 hours ago, Squid said:

Why not bump the version of the plugin so that every version to avoid any issues?

 

Normally I would have, but I just didn't have a chance to yet. My life is still a bit of a mess after moving (I'm currently sitting on the floor while I type this because most of my furniture won't arrive for another week haha).

 

I'm planning on incrementing the version later today though, but I wanted to get the quick and dirty fix out sooner rather than later.

 

  • Like 2
  • Thanks 1
Link to comment

Thanks for the work on this. No rush at all but I wanted to suggest a (simple?) fix before I forget.

 

My use case is weekly backups to the array which are then backed up to a versioned system. So I only need one backup on the array at a time. The problem is the lowest number allowed for Number of days to keep backups is 7 (inclusive) which ends up keeping two.

 

To allow the value I want (1) I run it with this patch with no apparent problems for several months:

root@NAS:~# diff /usr/local/emhttp/plugins/vmbackup/include/javascript/vmbackup.js.orig /usr/local/emhttp/plugins/vmbackup/include/javascript/vmbackup.js
1195c1195
<       change_attr("#number_of_days_to_keep_backups", "pattern", "^(0|([7-9]|[1-8][0-9]|9[0-9]|1[0-7][0-9]|180))$");
---
>       change_attr("#number_of_days_to_keep_backups", "pattern", "^(0|([1-9]|[1-8][0-9]|9[0-9]|1[0-7][0-9]|180))$");
root@NAS:~#

 

Link to comment

Bug report:

in "settings" => "custom cron" it's not possible to enter "/" symbol.

=>       possible to enter i.e.: "0 3 1 3,9 *"       (run at 3:00h 1.3. and 1.9.)

=> not possible to enter i.e.: "0 3 1 */2 *"       (run at 3:00h every second month)

Link to comment

@CS01-HS Your issue can be fixed by going to the Danger Zone tab and setting "Disable restrictive validation" to "Yes"

 

@peter76 your issue can be fixed by going to the Danger Zone tab and setting "Disable custom cron validation" to "Yes"

Additional Information:
 

@CS01-HS There are limits in place to prevent people from choosing values that could be dangerous without making sure they understand them. Also, if you only need 1 backup, why not just use "Number of Backups to Keep" and set it to 1 instead of using "number of days to keep backups"?

@peter76 With cron it is very complicated to validate all possible options, so I went with  something that would cover most scenarios while leaving the disable switch to allow for more complex ones like yours.



I've been trying to make the plugin's default state the bare minimum amount of restrictive necessary to help protect less experienced users from themselves, while still giving power users the ability to remove those restrictions and be more adventurous.

Nearly every setting can can be overridden somewhere, but I know that isn't very obvious right now. Making that more apparent is on my list of things to do in a future release.

 

Edited by JTok
forgot Disable custom cron validation
  • Thanks 1
Link to comment
15 minutes ago, JTok said:

@CS01-HS Your issue can be fixed by going to the Danger Zone tab and setting "Disable restrictive validation" to "Yes"

 

@peter76 your issue can be fixed by going to the Danger Zone tab and setting "Disable custom cron validation" to "Yes"

Additional Information:
 

@CS01-HS There are limits in place to prevent people from choosing values that could be dangerous without making sure they understand them. Also, if you only need 1 backup, why not just use "Number of Backups to Keep" and set it to 1 instead of using "number of days to keep backups"?

@peter76 With cron it is very complicated to validate all possible options, so I went with  something that would cover most scenarios while leaving the disable switch to allow for more complex ones like yours.

 

THANX JTOK - now I can run ... */3 ...
PS: it's only "Disable custom cron validation?" which has to be set to YES

Link to comment
1 minute ago, peter76 said:

THANX JTOK - now I can run ... */3 ...
PS: it's only "Disable custom cron validation?" which has to be set to YES

 

Yeah, that should be the only thing you need to change. If it isn't, then I have something to fix haha

Link to comment
  • 2 weeks later...

I removed it and then decided to reinstall but can't.


I get this error:

 

Quote

plugin: installing: https://raw.githubusercontent.com/jtok/unraid.vmbackup/master/vmbackup.plg
plugin: downloading https://raw.githubusercontent.com/jtok/unraid.vmbackup/master/vmbackup.plg
plugin: downloading: https://raw.githubusercontent.com/jtok/unraid.vmbackup/master/vmbackup.plg ... done
Removing package: xmlstarlet-1.6.1-x86_64-1_slonly
Removing files:
Removing package: pigz-2.3-x86_64-2_slonly
Removing files:

+==============================================================================
| Installing new package /boot/config/plugins/vmbackup/packages/xmlstarlet-1.6.1-x86_64-1_slonly.txz
+==============================================================================

Verifying package xmlstarlet-1.6.1-x86_64-1_slonly.txz.
Installing package xmlstarlet-1.6.1-x86_64-1_slonly.txz:
PACKAGE DESCRIPTION:
# xmlstarlet (command line xml tool)
#
# XMLStarlet is a command line XML toolkit that can be used to
# transform, query, validate, and edit XML documents and files using
# a simple set of shell commands, which work similarly to 'grep',
# 'sed', 'awk', 'tr', 'diff', or 'patch' on plain text files.
#
# Homepage https://sourceforge.net/projects/xmlstar/
#
Executing install script for xmlstarlet-1.6.1-x86_64-1_slonly.txz.
Package xmlstarlet-1.6.1-x86_64-1_slonly.txz installed.

+==============================================================================
| Installing new package /boot/config/plugins/vmbackup/packages/pigz-2.3-x86_64-2_slonly.txz
+==============================================================================

Verifying package pigz-2.3-x86_64-2_slonly.txz.
Installing package pigz-2.3-x86_64-2_slonly.txz:
PACKAGE DESCRIPTION:
# pigz (Parallel gzip)
#
# pigz, which stands for parallel implementation of gzip, is a fully
# functional replacement for gzip that exploits multiple processors and
# multiple cores to the hilt when compressing data. pigz was written by
# Mark Adler, and uses the zlib and pthread libraries.
#
# Home page: http://www.zlib.net/pigz/
#
Package pigz-2.3-x86_64-2_slonly.txz installed.

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

plugin: run failed: /bin/bash retval: 1

Updating Support Links

 

Link to comment

Got the above error fixed by simply rebooting unRAID but I'm getting this now.

 

2021-03-25 17:47:08 information: /mnt/user/VMBackups/FSWin10PVM does not exist. creating it.
mkdir: created directory '/mnt/user/VMBackups/FSWin10PVM'
/tmp/vmbackup/scripts/default/user-script.sh: line 424: vdisk_types["$vdisk_path"]: bad array subscript
2021-03-25 17:47:08 information: finished attempt to backup FSWin10PVM to /mnt/user/VMBackups.
2021-03-25 17:47:08 information: cleaning out logs over 1.
2021-03-25 17:47:08 information: did not find any log files to remove.
2021-03-25 17:47:08 information: cleaning out error logs over 10.

 

Any thoughts?  The backup worked once but won't work again.

 


ETA: I figured it out.  It happened because I removed the OS Install ISO path from the VM setup.  Once I put it back in the backup worked again.

Edited by jlficken
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.