Giter VIP home page Giter VIP logo

unraid-vmbackup's Introduction

unraid-vmbackup

v1.2.2 - 2019/12/18

Script for use with unRAID's CA User Scripts plugin. See here for more information.

Currently the script is in a relatively stable state, and most of the features have been implemented. I have tested them as well as I can, but I cannot guarantee they will work correctly for everyone, so be sure to test thoroughly on your system before depending on this script for backups. Please review the Change Log and To-Do List if you would like to know more.

Important

The virtual disks attached to a single VM must have unique names regardless of their location since during the backup they will be placed into the same folder. i.e. VM1 cannot have /mnt/diskX/vdisk1.img and /mnt/users/domains/VM1/vdisk1.img since the vdisks will overwrite the each other during the backup. However, VM1 and VM2 can both have a vdisk1.img since they will be backed up to different folders.

Installation

  • Add the script and description files to the CA User Scripts plugin. No other files are necessary to make the script work.

  • Set the variables in the script file.

    • be sure to set enabled = "1" to ensure that the script will run.

    • to enable the script while parity check is running change line 4 from "noParity=true" to "noParity=false"

  • Choose a schedule in the CA User Scripts plugin.

Script options

  • Choose a backup location.

  • Choose to backup all VMs, or list specific VMs to be backed up.

    • If backup all VMs is enabled, the list of VMs to backup is used as an exclusion list instead.
  • List specific vdisks to skip, if any.

  • List specific vdisk extensions to skip, if any (iso listed by default).

  • Option to use snapshots to backup VMs without shutting down.

    • be sure to install the qemu guest agent on VMs to enable quiescence, which will improve the integrity of backups.

    • the disk path in the VM config cannot be /mnt/user, but instead must be /mnt/cache or /mnt/diskX.

  • Option to kill a VM that won't shutdown cleanly.

VM restart options

  • Option to have VMs start after backup based on their previous state.

  • Advanced: Option to have VMs start after successful backup regardless of previous state.

  • Advanced: Option to have VMs start after failed backup regardless of previous state.

Backup retention options

  • Choose the number of days to keep backups.

  • Choose the number backups to keep.

Logging and notification options

  • Option to log to file.

  • Choose the number of log files to keep.

  • Option to log messages through unRAID notification system.

    • Option to only receive error notifications

    • Option to receive detailed notifications.

      • sends notifications when vm backups are started and stopped.

      • sends notifications when old backups are deleted.

Additional options

  • Option to compress backups.

  • Option to timestamp backups.

  • Option to disable delta syncs.

  • Option to only use rsync.

  • Advanced: Choose the extension used for snapshots.

  • Advanced: Option to fallback to standard backups if snapshot creation fails.

  • Advanced: Option to pause VMs instead of shutting them down during standard backups. Could result in unusable backups.

  • Advanced: Option to keep specific VMs running during backup. Not recommended.

  • Advanced: Option to enable reconstruct write during backups.

  • Advanced: Option to compare files and retry backup in the event of failure.

  • Advanced: Option to skip backing up xml configuration.

  • Advanced: Option to skip backing up nvram.

  • Advanced: Option to skip backing up vdisks.

  • Advanced: Choose the number of times to check if a VM is shut down.

  • Advanced: Choose the number of seconds to wait between checks to see if a VM is shut down.

Disclaimer

I do not make any guarantees as to the function of this script. It is provided as-is. Use at your own risk.

Originally from unraid-autovmbackup by Daniel Jackson (danioj) here
Includes additions for removing old backups added by Deeks here
Includes additions for creating snapshots added by Dikkekop (thies88) here

unraid-vmbackup's People

Contributors

jtok avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.