Jump to content
JTok

VM Backup Plugin

95 posts in this topic Last Reply

Recommended Posts

This is a beta version of a plugin I am working on to replace the unraid-vmbackup script I have been maintaining here and here.

It is based off the latest version of the script (v1.2.3), and I will be maintaining both for now as there are some use-cases for the script that the plugin cannot currently replace. This is provided as-is with no guarantees.

 

That said, and without further ado, the current version of the plugin can be found here:

https://github.com/JTok/unraid.vmbackup/tree/v0.2.0

 

-JTok

 

Feel free to buy me a beer (or two 😋)

Edited by JTok
v0.2.0
  • Like 7
  • Thanks 1

Share this post


Link to post

Run the beta  plugin. Perfect!!

I did however pull it from your link as I couldnt find it in Community Applications,

 

Thank you very much.

Share this post


Link to post

Works very well so far, well done. One request would be to allow unassigned devices to be used as the backup location, it only allows unraid shares at the moment.


Sent from my iPhone using Tapatalk

Share this post


Link to post
1 hour ago, Ashe said:
Works very well so far, well done. One request would be to allow unassigned devices to be used as the backup location, it only allows unraid shares at the moment.

 

You should be able to manually type any path that starts with /mnt/ even though the drop down list only shows shares.

 

 

If you need  a path that starts with something other than /mnt/:
Under the Danger Zone tab, at the very bottom. there is a setting called “Disable restrictive validation”. If you set it to ‘Yes’, it should allow you to chose any path.


Sent from my iPhone using Tapatalk

 

 

Edited by JTok
additional info

Share this post


Link to post

@JTok Big thanks in the first place for your work. Looks like the plugin works for me with a quick test on a single VM, normal backup+compression. A small issue I've found is when selecting the target path for the backup. It's basically not possible to read the dropdown menu items. I'am using the Black theme with Firefox. Same with Brave browser and Chrome on Unraid 6.8. Just to let you know.

grafik.png.c66197d0538a9907e016925ad571a22b.png

Share this post


Link to post
 
You should be able to manually type any path that starts with /mnt/ even though the drop down list only shows shares.



I tried manually typing the path but without changing the mode and it would not allow. Will try again. Thanks


Sent from my iPhone using Tapatalk

Share this post


Link to post


I tried manually typing the path but without changing the mode and it would not allow. Will try again. Thanks



Make sure the path you’re typing contains a trailing slash. I’m going to change that requirement in a future release, but I didn’t change it yet for the beta.


Sent from my iPhone using Tapatalk

Share this post


Link to post



Make sure the path you’re typing contains a trailing slash. I’m going to change that requirement in a future release, but I didn’t change it yet for the beta.


Sent from my iPhone using Tapatalk

I'm sure the trailing Slash was there. Will try again and report back


Sent from my iPhone using Tapatalk

Share this post


Link to post
@JTok Big thanks in the first place for your work. Looks like the plugin works for me with a quick test on a single VM, normal backup+compression. A small issue I've found is when selecting the target path for the backup. It's basically not possible to read the dropdown menu items. I'am using the Black theme with Firefox. Same with Brave browser and Chrome on Unraid 6.8. Just to let you know.
grafik.png.c66197d0538a9907e016925ad571a22b.png


Weird. I’ll check it out. Thanks


Sent from my iPhone using Tapatalk

Share this post


Link to post

I'm sure the trailing Slash was there. Will try again and report back


Sent from my iPhone using Tapatalk

No, I stand corrected you were quite right, trailing Slash did work fine.


Sent from my iPhone using Tapatalk

Share this post


Link to post
@JTok Just one little thing I need is a big red button labled "BACKUP NOW" 


yeah! That’s on my radar! When testing, it was a little frustrating at times without one.


Sent from my iPhone using Tapatalk

Share this post


Link to post
Very cool, can't wait to give it a whirl.
Quick question: do you plan to add restore capability at some point?


I hadn’t really thought about it, but I probably should lol.

I’ll put that on my to-do list, but that’s probably a post-beta feature right now.



Sent from my iPhone using Tapatalk

Share this post


Link to post
3 hours ago, JTok said:

 


I hadn’t really thought about it, but I probably should lol.

I’ll put that on my to-do list, but that’s probably a post-beta feature right now.



Sent from my iPhone using Tapatalk

I second that request (for restore functionality).
No hurry, but that would be a valuable addition.

Share this post


Link to post
19 hours ago, bastl said:

@JTok Just one little thing I need is a big red button labled "BACKUP NOW"  😂

Green. Make it green :)  Red means bad things :)

Share this post


Link to post
13 hours ago, Ruthalas said:

I second that request (for restore functionality).
No hurry, but that would be a valuable addition.

Yeah, it would be good. Initially though just information about how to do it manually is good enough.

Share this post


Link to post

Here's my draft at manual instructions, feel free to use them as a starting point. I just backed up one VM as a test in this case.

1. Stop all VMs.

2. Take a peak at what VMs you're using and where you're backing them up. Here's my config:

image.png.d50f62c63a6df228754c8f4cd1805869.png

This means I should be able to find a directory here:

/mnt/user/Saidin/backuptest/Forsaken

3. Open a command shell.

image.png

4. Now you need to copy your VM vdisk and VM xml to the right location. If you're truly restoring, you'll need to make some directories as well. I'm assuming you're using the default location for domain disks, /domains share.

root@Truesource:/# mkdir /mnt/user/domains/Forsaken
root@Truesource:/# cp /mnt/user/Saidin/backuptest/Forsaken/20191220_1017_vdisk1.img /mnt/user/domains/Forsaken/vdisk1.img 
root@Truesource:/# cp /mnt/user/Saidin/backuptest/Forsaken/20191220_1017_Forsaken.xml /etc/libvirt/qemu/Forsaken.xml 

5. Start your VM.

 

 

Edited by DBJordan
Minor corrections.

Share this post


Link to post

New release with some minor functional changes and a few bug fixes. This was mostly background stuff with the exception of adding a "Backup Now" button.

 

 

v0.1.7 - 2019/12/22
Ms. Frizzle

- fixed minor issues.
- fixed paths requiring trailing slashes.
- fixed backup location drop-down color when using black theme.
- added additional logging.
- added donate button.
- added backup now button.
- changed backup location drop-down start folder to /mnt/.
- updated help.
- updated readme.

 

https://github.com/JTok/unraid.vmbackup/tree/v0.1.7

 

-JTok

Share this post


Link to post
Will this eventually get added to CA so it will update automatically?

unRAID should still detect updates in the plugin screen without it being part of CA (assuming I didn’t mess something up). And the CA update plugin should also still do automatic updates from what I can tell.

 

That said, I've been in contact with Squid about adding it, so that should get done soon.

 

Edited by JTok

Share this post


Link to post
54 minutes ago, JTok said:

unRAID should still detect updates in the plugin screen without it being part of CA (assuming I didn’t mess something up). And the CA update plugin should also still do automatic updates from what I can tell.

 

That said, I've been in contact with Squid about adding it, so that should get done soon.

 

hmm it didn't for me, but maybe I was too quick - dunno.  Thanks again for making this into a plugin.

Share this post


Link to post

Hi,

 

Great Job - I've been using your script for a while and it save me a lot of time. Thanks for that!

 

Could you add an option to not backup/stop running vm's?

Would it be possible to set up different amount of days/backups for each vm?

Share this post


Link to post

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.