diff --git a/rsnapshot-daily.timer b/rsnapshot-daily.timer index cde795e..5e270cf 100644 --- a/rsnapshot-daily.timer +++ b/rsnapshot-daily.timer @@ -2,8 +2,8 @@ Description=rsnapshot daily backup [Timer] -# 2:00 is the clock time when to start it -OnCalendar=2:00 +# 0:00 is the clock time when to start it +OnCalendar=0:00 Persistent=true Unit=rsnapshot@daily.service diff --git a/rsnapshot-monthly.timer b/rsnapshot-monthly.timer new file mode 100644 index 0000000..4b85ec4 --- /dev/null +++ b/rsnapshot-monthly.timer @@ -0,0 +1,10 @@ +[Unit] +Description=rsnapshot monthly backup + +[Timer] +OnCalendar=*-*-01 05:00 +Persistent=true +Unit=rsnapshot@monthly.service + +[Install] +WantedBy=timers.target diff --git a/rsnapshot-weekly.timer b/rsnapshot-weekly.timer new file mode 100644 index 0000000..64ecf58 --- /dev/null +++ b/rsnapshot-weekly.timer @@ -0,0 +1,10 @@ +[Unit] +Description=rsnapshot weekly backup + +[Timer] +OnCalendar=fri 03:30 +Persistent=true +Unit=rsnapshot@weekly.service + +[Install] +WantedBy=timers.target diff --git a/rsnapshot.spec b/rsnapshot.spec index 4fb129f..77328b6 100644 --- a/rsnapshot.spec +++ b/rsnapshot.spec @@ -1,6 +1,6 @@ Name: rsnapshot Version: 1.4.2 -Release: 1mamba +Release: 2mamba Summary: rsnapshot is a filesystem snapshot utility for making backups of local and remote systems Group: Applications/Archiving Vendor: openmamba @@ -10,6 +10,8 @@ URL: http://www.rsnapshot.org/ Source: https://github.com/rsnapshot/rsnapshot.git/%{version}/rsnapshot-%{version}.tar.bz2 Source1: rsnapshot-daily.timer Source2: rsnapshot@.service +Source3: rsnapshot-weekly.timer +Source4: rsnapshot-monthly.timer License: GPL BuildRoot: %{_tmppath}/%{name}-%{version}-root ## AUTOBUILDREQ-BEGIN @@ -19,6 +21,7 @@ BuildRequires: rsync ## AUTOBUILDREQ-END Requires: openssh-clients Requires: perl +Requires: perl-Lchown Requires: rsync %description @@ -41,6 +44,8 @@ Depending on your configuration, it is quite possible to set up in just a few mi install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/rsnapshot-daily.timer install -D -m0644 %{SOURCE2} %{buildroot}%{_unitdir}/rsnapshot@.service +install -D -m0644 %{SOURCE3} %{buildroot}%{_unitdir}/rsnapshot-weekly.timer +install -D -m0644 %{SOURCE4} %{buildroot}%{_unitdir}/rsnapshot-monthly.timer cp %{buildroot}%{_sysconfdir}/rsnapshot.conf.default %{buildroot}%{_sysconfdir}/rsnapshot.conf @@ -54,12 +59,18 @@ cp %{buildroot}%{_sysconfdir}/rsnapshot.conf.default %{buildroot}%{_sysconfdir}/ %{_bindir}/rsnapshot %{_bindir}/rsnapshot-diff %{_unitdir}/rsnapshot-daily.timer +%{_unitdir}/rsnapshot-weekly.timer +%{_unitdir}/rsnapshot-monthly.timer %{_unitdir}/rsnapshot@.service %{_mandir}/man1/rsnapshot.1* %{_mandir}/man1/rsnapshot-diff.1* %doc AUTHORS COPYING ChangeLog %changelog +* Sat Sep 09 2017 Silvan Calarco 1.4.2-2mamba +- require perl-Lchown +- add systemd weekly and monthly time, change daily start time (00:00), verbose output (-v) + * Tue Jan 26 2016 Silvan Calarco 1.4.2-1mamba - update to 1.4.2 diff --git a/rsnapshot@.service b/rsnapshot@.service index 0f66217..6ceace0 100644 --- a/rsnapshot@.service +++ b/rsnapshot@.service @@ -5,4 +5,4 @@ Description=rsnapshot (%I) backup Type=oneshot Nice=19 IOSchedulingClass=3 -ExecStart=/usr/bin/rsnapshot %I +ExecStart=/usr/bin/rsnapshot -v %I