The grappling hook for Proxmox backups.
Project description
Proxmox-grapple
The Python app that "hooks" into Proxmox.
This is a clone of vzdump-hook-script.pl that is written in Python, and that offers a lot more configurability.
Different phases of the vzdump
backup can be hooked into, and scripts can be run.
Installation
The recommended way to install proxmox-grapple
is to use pipx.
After getting pipx
installed, simply run:
username@proxmox:~$ pipx install proxmox-grapple
Please, please don't use pip system-wide.
Once installed, you need to tell Proxmox (specifically vzdump
) to use the app. Edit /etc/vzdump.conf
and add or edit
the script
setting:
script: /home/username/.local/bin/proxmox-grapple
Configuration
Overview
proxmox-grapple
is configured with a YAML-style file. An example:
production:
job-end:
script:
- echo 'hi'
- sleep 1
- echo 'there'
- echo 'This is a test.'
backup-end:
extract:
enabled: false
source_directory: /tmp
destination_directory: /tmp
# exclude_storeids:
Location
The default location for the configuration is /etc/proxmox_grapple.yml
, or proxmox_grapple.yml
in the current
working directory, but this can also be specified on the commandline.
If a non-absolute path is given, Dynaconf will iterate upwards: it will look at each parent up to the root of the
system. For each visited folder, it will also try looking inside a /config
folder.
Configuration environments
It can also use different configuration settings based on arbitrary environment names (eg. production
, lab
, etc.) It
uses the Dynaconf Python project for configuration, so using environment variables to
choose the environment and any other configuration option is possible.
⚠️ The default environment is
production
For example, to choose a different configuration environment, set the environment variable ENV_FOR_DYNACONF=lab
:
root@proxmox:~# ENV_FOR_DYNACONF=lab proxmox-grapple --dump-config
Each top-level key should match the different vzdump
phases. The currently recognised phases are:
- job-init
- job-start
- job-end
- job-abort
- backup-start
- backup-end
- backup-abort
- log-end
- pre-stop
- pre-restart
- post-restart
⚠️ The extract argument is currently not tested, and should be treated as a proof-of-concept only.
Supported versions
proxmox-grapple
supports the following VE versions:
VE version | Debian version | Python version | VE EoL |
---|---|---|---|
8 | 12 (Bookworm) | 3.11 | TBA |
7 | 11 (Bullseye) | 3.9 | 2024-07 |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file proxmox-grapple-1.5.4.tar.gz
.
File metadata
- Download URL: proxmox-grapple-1.5.4.tar.gz
- Upload date:
- Size: 19.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85edd2ccf9f630cc74cd8e3c09fd5a7a7d02caf46371704ff0754a392299c4ad |
|
MD5 | 65ecdd7b5e8246b62cbe5f1b7295ad91 |
|
BLAKE2b-256 | 70e3c2b2439a0d76c194f4339c8052b5e7ac8b72b18cf8437c5f256aa6abff90 |
File details
Details for the file proxmox_grapple-1.5.4-py3-none-any.whl
.
File metadata
- Download URL: proxmox_grapple-1.5.4-py3-none-any.whl
- Upload date:
- Size: 19.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a0eb2fd672844ab18ec275a02cce5c9732c234426f96d0a5137d81e69fb30e0 |
|
MD5 | 8b3ad4dd5065ab8acaa7385044c2664f |
|
BLAKE2b-256 | c1be704db150f10159ee49a54f36277201f25c1f5b2e0c3856c2fdfbc8949f78 |