Jump to content

VM Backup Plugin

Featured Replies

Posted

⚠️ NOTICE: I currently do not have the time to do more than maintain this project for myself at the moment. I will eventually do more work on it as my life permits, but for now development will be sporadic at best. I am more happy to add someone else to the project to maintain it, or even accept some PRs as that is much easier for me to find time for

 

Mod note: this plugin has multiple known issues, use with care.

 

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.3.1), 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.9

 

-JTok

 

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

Edited by JTok
update to v0.2.9

  • Replies 539
  • Views 162.8k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Hello, long time no see. I am truly sorry to see so many of you have had an issue with this plugin, and it was not my intention to abandon it for as long as I have. Sadly, life had other plans (a

  • HOW TO RESTORE!!!! Option 1- Script: Use the great script from @petchav, many thanks! See the video below for a guide on how to use this.    Option 2- Manual restore:

  • 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. Fr

Posted Images

  • Author

realizelol strikes again!

 

v0.2.9 - 2024/05/02

Widdershins

  • add a more detailed VM description to the empty vdisk_path notification (@realizelol)
  • add a flexible variable to the sleep-timer before ACPI VM shutdown so VM can recognize the "power-button-shutdown" (@realizelol)

 

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

 

 

-JTok

Edited by JTok
v0.2.9

  • Author

⚠️ NOTICE: I currently do not have the time to do more than maintain this project for myself at the moment. I will eventually do more work on it as my life permits, but for now development will be sporadic at best. I am more happy to add someone else to the project to maintain it, or even accept some PRs as that is much easier for me to find time for

Edited by JTok
add notice about my availability

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.

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

  • Author
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

@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

 
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
  • Author


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



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
  • Author
@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 [emoji106]


Sent from my iPhone using Tapatalk

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

Very cool, can't wait to give it a whirl.

Quick question: do you plan to add restore capability at some point?


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
  • Author
@JTok Just one little thing I need is a big red button labled "BACKUP NOW"  [emoji23]


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


Sent from my iPhone using Tapatalk
  • Author
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
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.

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 :)

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.

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 peek 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.

  • Author

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

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

  • Author
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

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.

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?

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...