%global commit 7ce1fad282e757cbaafa5d57179beb1cfdd35c10 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global snapinfo 20231108git%{shortcommit} Name: dbdump Version: 1.0 Release: 3.%{snapinfo}%{?dist} Summary: Dumps, encrypts and backups various databases License: GPLv3+ URL: https://github.com/Astranox/db-backup Source0: %{url}/archive/%{commit}/db-backup-%{shortcommit}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-setuptools Requires: libdump %description This program is designed to do regular database dumps from either PostgreSQL or MySQL. This is useful as a backup strategy for databases, since just copying the data-directories is not guaranteed to yield consistent database snapshots. dbdump.py aims to automate this task along with some additional tasks you might want to do while dumping. Hence, this script can optionally dump to a remote directory via SSH and optionally encrypts the data with GPG. Both tools are usually shipped with any Linux distribution but might require some configuration to get it working. %package -n libdump Summary: dbdump library BuildArch: noarch %description -n libdump library for dbdump %package -n dbclean Summary: dbdump cleaner BuildArch: noarch %description -n dbclean cleaner for dbdump %prep %autosetup -n db-backup-%{commit} -p1 %build cd dbdump %py3_build %install install -D -m 755 -p dbclean/dbclean.py %{buildroot}%{_bindir}/dbclean install -D -m 755 -p dbdump/dbdump.py %{buildroot}%{_bindir}/dbdump cd dbdump %py3_install find %{buildroot} %files %license %{name}/COPYING %doc %{name}/AUTHORS %{name}/ChangeLog %{name}/README %{name}/dbdump.conf.example %{_bindir}/dbdump %{python3_sitelib}/%{name}-%{version}-py%{python3_version}.egg-info %files -n libdump %{python3_sitelib}/libdump/ %files -n dbclean %license %{name}/COPYING %doc dbclean/AUTHORS dbclean/ChangeLog dbclean/README dbclean/TODO dbclean/dbclean.conf.example %{_bindir}/dbclean %changelog * Wed Nov 08 2023 David Kaufmann - 1.0 - Update and add borg support * Sun Dec 08 2019 David Kaufmann - 1.0 - Initial commit