Skip to content

marconsys/ovicbackup

Repository files navigation

oViCbackup

A set of backup and snapshot scripts for oVirt/RHV virtual machines and for Ceph RBD volumes.

Copyright

Copyright (c) 2020-2021 Marco Napolitano
The author is Marco Napolitano, email: mannysys-AaaaT-outlook.com put at sign instead of -AaaaT-
The content of the repository is licensed under Apache License, available at: http://www.apache.org/licenses/LICENSE-2.0

Disclaimer

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Description

This repository contains a set of backup and snapshot scripts for oVirt virtual machines and Ceph volumes.
The main script is made to be called directly, the others are made just to be in turn called by the main scripts. Scripts are supposed to be run by a local user called "ovicbackup".
The script to be called directly is:
ovicbackup.sh
Be sure to install ovirt python components to use ovirt scripts, to correctly install and configure ceph client to use ceph scripts, to correctly install backy2 software as python module for the "ovicbackup" user, that runs the script.
Examples of script scheduling in crontab:

00 00 * * * /opt/ovicbackup/libexec/ovicbackup.sh ovicrbdsnapshot
30 00 * * 6 /opt/ovicbackup/libexec/ovicbackup.sh ovicrbdbackup
30 00 * * 7 /opt/ovicbackup/libexec/ovicbackup.sh ovicvmbackup

Secondary scripts are in turn called based on the argument passed to ovicbackup.sh, which is one of the three shown in the example crontab. Then operations are done on targets defined in lists:
/opt/ovicbackup/lists/ovicrbdsnapshot.list - list of ceph rbd volumes to be snapshotted
/opt/ovicbackup/lists/ovicrbdbackup.list - list of ceph rbd volumes to be cloned for backup
/opt/ovicbackup/lists/ovicvmbackup.list - list of ovirt/rhv vms to be cloned and exported for backup

There is also the script:
ovicbackupstatus.sh
It gives some output if it finds anomailes inside ".status" files; it gives no output if no anomalies are found: so it's useful for monitoring, suitable for monitoring tools.

Directory structure for these script on the machine that runs them, is as follows:
/opt/ovicbackup/libexec/ -> scripts
/opt/ovicbackup/lists/ -> list files
/opt/ovicbackup/etc/ -> config files
/opt/ovicbackup/log/ -> log files
/opt/ovicbackup/status/ -> status files
/opt/ovicbackup/tmp/ -> temporary files

About

A set of backup and snapshot scripts for oVirt/RHV virtual machines and for Ceph RBD volumes.

Resources

License

Stars

Watchers

Forks

Contributors