#!/bin/bash SSH_HOST=cluster.univ@se.imbg.org.ua SSH_PORT=3322 BACKUP_DEST_BASE=/srv/backups/cluster.univ/pacemaker # backup from DRBD-master a-node only grep -q '/mnt/opt' /proc/mounts || exit 0 # dump Pacemaker CIB pcs cluster cib | ssh -p ${SSH_PORT} ${SSH_HOST} "mkdir -p $BACKUP_DEST_BASE/$( date +'%Y%m' ); cat | gzip > $BACKUP_DEST_BASE/$( date +'%Y%m' )/$( date +'%d' ).xml.gz"