new version tested by using pypi to install!

modified:   .gitignore
	modified:   README.md
	modified:   setup.py
This commit is contained in:
Russell Ballestrini 2024-07-08 08:32:28 -04:00
parent f9e940e509
commit 138d2b7632
3 changed files with 58 additions and 22 deletions

2
.gitignore vendored
View file

@ -1,4 +1,6 @@
venv venv
venv2
build
virt_back.egg-info virt_back.egg-info
*.tar *.tar

View file

@ -57,7 +57,39 @@ Options:
--create-all attempt to start ALL guests --create-all attempt to start ALL guests
``` ```
How to backup zfs snapshot all KVM instances on a TrueNAS Scale,
## Dependencies
Before installing `virt-back`, you need to ensure that the necessary development libraries for `libvirt` are installed on your system. These libraries are required for the `libvirt-python` package, which `virt-back` depends on.
### Fedora/RedHat
On Fedora or RedHat-based systems, you can install the `libvirt-devel` package using `dnf`:
```bash
sudo dnf install libvirt-devel
```
### Ubuntu/Debian
On Ubuntu or Debian-based systems, you can install the `libvirt-dev` package using `apt-get`:
```bash
sudo apt-get install libvirt-dev
```
### Installing `virt-back`
Once the necessary development libraries are installed, you can install `virt-back` using `pip`:
```bash
pip install virt-back
```
This will install `virt-back` along with its dependencies, including `libvirt-python`.
## How to backup zfs snapshot all KVM instances on a TrueNAS Scale,
``` ```
root@guile[/mnt/downloads/virt-back]# ./virt-back -u "qemu+unix:///system?socket=/run/truenas_libvirt/libvirt-sock" --backup-all --path /mnt/personal/backup/virt-back --no-gzip --retention 5 root@guile[/mnt/downloads/virt-back]# ./virt-back -u "qemu+unix:///system?socket=/run/truenas_libvirt/libvirt-sock" --backup-all --path /mnt/personal/backup/virt-back --no-gzip --retention 5

View file

@ -1,23 +1,17 @@
# installation:
# * pip install virt-back
# * easy_install virt-back
from setuptools import setup from setuptools import setup
import os
DESCRIPTION = """A backup utility for QEMU, KVM, XEN, and Virtualbox guests. # Read the contents of your README file
Virt-back is a python application that uses the libvirt api to safely with open(os.path.join(os.path.dirname(__file__), "README.md"), encoding="utf-8") as f:
shutdown, gzip, and restart guests. The backup process logs to syslog long_description = f.read()
for auditing and virt-back works great with cron for scheduling outages.
Virt-back has been placed in the public domain and
the latest version may be downloaded here:
https://git.unturf.com/python/virt-back
"""
setup( setup(
name="virt-back", name="virt-back",
version="0.2.1", version="0.2.2",
description="virt-back: A backup utility for QEMU, KVM, XEN, and Virtualbox guests", description="virt-back: A backup utility for QEMU, KVM, XEN, and Virtualbox guests",
keywords="backup virtual hypervisor QEMU KVM XEN Virtualbox", keywords="backup virtual hypervisor QEMU KVM XEN Virtualbox",
long_description=DESCRIPTION, long_description=long_description,
long_description_content_type="text/markdown",
author="Russell Ballestrini", author="Russell Ballestrini",
author_email="russell@ballestrini.net", author_email="russell@ballestrini.net",
url="https://git.unturf.com/python/virt-back", url="https://git.unturf.com/python/virt-back",
@ -26,20 +20,28 @@ setup(
py_modules=["virtback"], py_modules=["virtback"],
include_package_data=True, include_package_data=True,
scripts=["virt-back"], scripts=["virt-back"],
install_requires=[
"libvirt-python",
],
) )
""" """
setup() setup()
keyword args: http://peak.telecommunity.com/DevCenter/setuptools keyword args: http://peak.telecommunity.com/DevCenter/setuptools
configure pypi username and password in ~/.pypirc:: # built and uploaded to pypi with this:
[pypi] python setup.py sdist
username: twine upload dist/*
password:
build and upload to pypi with this::
python setup.py sdist bdist_egg register upload
""" """
# Installation Instructions:
# To install virt-back, you can use pip:
# * pip install virt-back
#
# Note: You need to have the libvirt development libraries installed.
# On Fedora/RedHat, you can install it with:
# * sudo dnf install libvirt-devel
# On Ubuntu, you can install it with:
# * sudo apt-get install libvirt-dev