forked from narendergaddam/victoriametrics-rpm
-
Notifications
You must be signed in to change notification settings - Fork 5
/
vmbackup.spec
36 lines (28 loc) · 1.05 KB
/
vmbackup.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
%define release_arch amd64
%ifarch aarch64
%define release_arch arm64
%endif
Name: vmbackup
Version: 1.108.0
Release: 2
Summary: vmbackup creates VictoriaMetrics data backups from instant snapshots.
Group: Development Tools
License: ASL 2.0
URL: https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v%{version}/vmutils-linux-%{release_arch}-v%{version}.tar.gz
Source0: LICENSE
Requires(pre): /usr/sbin/useradd, /usr/bin/getent, /usr/bin/echo, /usr/bin/chown
Requires(postun): /usr/sbin/userdel
BuildRequires: curl
%description
vmbackup creates VictoriaMetrics data backups from instant snapshots.
%prep
curl -L %{url} > vmutils.tar.gz
tar -zxf vmutils.tar.gz
%install
%{__install} -m 0755 -d %{buildroot}%{_bindir}
cp vmbackup-prod %{buildroot}%{_bindir}/vmbackup-prod
%pre
/usr/bin/getent group victoriametrics > /dev/null || /usr/sbin/groupadd -r victoriametrics
/usr/bin/getent passwd victoriametrics > /dev/null || /usr/sbin/useradd -r -m -d /home/victoriametrics -s /bin/bash -g victoriametrics victoriametrics
%files
%{_bindir}/vmbackup-prod