build cback
cback currently only targets RHEL8 and Alma8 for building. EL9 builds are in progress. Please avoid trying to build cback on differing distros, as they are unsuported. To manually build cback for testing or evaluation, do the following:
- Clone the cback repository with
git clone https://gitlab.cern.ch/cback/restic-backup-agent
- Install required dependencies for building and running with
dnf install gcc rpmdevtools restic python39 python39-pip
- Install poetry with their official installer
- Build an rpm from source with
make rpm
from inside the cloned repo. - Install with
dnf install cback-*noarch.rpm; poetry install
- Test that cback has built correctly with
cback --version
[note] if you are iteratively developing cback with new features using this method, you can build and install
quickly with make clean; make rpm; dnf remove cback -y; dnf install cback-*noarch.rpm -y
build a cback database
cback requires a MySQL database for agents to run, we provide for this purpose within the src/repository/mysql
directory:
init.sql
to instantiate a new DB.backup_procedures.sql
to update and or install backup specific sql proceduresprune_procedures.sql
ditto^ for prunerestore_procedures.sql
ditto^ for restoreverify_procedures.sql
ditto^ for verify
The means of installing and providing a database is left to the reader, however you can install each of these using:
mysql -h <DB-IP> -P <DB-PORT> -u <USERNAME> -p < src/repository/mysql/init.sql
mysql -h <DB-IP> -P <DB-PORT> -u <USERNAME> -p cbackboxdb < src/repository/mysql/backup_procedures.sql
mysql -h <DB-IP> -P <DB-PORT> -u <USERNAME> -p cbackboxdb < src/repository/mysql/prune_procedures.sql
mysql -h <DB-IP> -P <DB-PORT> -u <USERNAME> -p cbackboxdb < src/repository/mysql/restore_procedures.sql
mysql -h <DB-IP> -P <DB-PORT> -u <USERNAME> -p cbackboxdb < src/repository/mysql/verify_procedures.sql