Code Monkey home page Code Monkey logo

backup-vm-script's Introduction

Proxmox VM remote backup script

This is a script originally designed for internal use at Privex for backing up both internal and customer VMs to a remote storage such as Backblaze B2, Amazon S3, or SFTP servers using RClone.

It assumes you store your VMs on an LVM, and will try to automatically identify the VG your VMs are on, based off of a list of known VG names under KNOWN_PREFIXES, it falls back to FALLBACK_PREFIX if it can't auto-detect the correct VG. You can force it to use a specific VG by setting VG_PREFIX either in the .env file, or passed as an environment variable.

Basic usage

git clone https://github.com/Privex/backup-vm-script.git
cd backup-vm-script

# You'll want to adjust at least RCLONE_DST to point to the rclone remote you want to use
cp example.env
nano .env

# View the built-in help for more usage info + examples
./backupvm.sh

# Backup the full disk 0 of VM1234 as a compressed image file via Rclone
./backupvm.sh image 1234

# Mount and Tar all partitions on disk 0 of VM1234, compress them on-the-fly, and upload them via Rclone
./backupvm.sh tar 1234

# Mount and Tar just partition 5 of VM1234's disk 0 and upload to rclone
./backupvm.sh tar 1234 5

License

Released under GNU GPL 3.0

(C) 2023 Privex Inc. - [https://www.privex.io](https://www.privex.io)
Originally written by Someguy123 for use at Privex

backup-vm-script's People

Contributors

someguy123 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ais1175

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.