This bash script backups logical volumes via restic. To simplify repo handling, this script takes repo details from rescript config.
- zabbix-sender
- pip3
- python3: humanfriendly
- Zabbix Rescript Restic Backup Template
lvm-rescript [repo_name] [command] [lv_name|path-to-list]
block-level-backup
creates a lvm-snapshot & pipes the volume using dd to resticblock-level-gz-backup
creates a lvm-snapshot & pipes the volume using dd and pigz to resticfile-level-backup
creates a lvm-snapshot & creates a restic backup using the mounted snapshotblock-level-restore
restores dd stored logical volume(s)block-level-gz-restore
restores dd and pigz stored logical volume(s)file-level-restore
restores as ext4 disk using a volume mount
- Provide the LV name without VG.
- Provide the path to a list of LV names. LVs listed as #comment won't be backed up.
- Omit, to backup all volumes, except *bak, *cache, *swap, *swp and *tmp.
curl -o /usr/bin/lvm-rescript https://raw.githubusercontent.com/sebastian13/lvm-restic-backup/master/lvm-restic-backup.sh
chmod +x /usr/bin/lvm-rescript
For Zabbix LVM Discovery also download the script:
curl -o /etc/zabbix/scripts/rescript-lvm-discovery.pl https://raw.githubusercontent.com/sebastian13/zabbix-templates/master/rescript-restic-backup/scripts/rescript-lvm-discovery.pl
chmod +x /etc/zabbix/scripts/rescript-lvm-discovery.pl