1 |
Summary: Makes the SME server a dedicated rsync based backup server |
2 |
%define name smeserver-affa |
3 |
Name: %{name} |
4 |
%define version 0.9.0 |
5 |
%define release 5 |
6 |
Version: %{version} |
7 |
Release: %{release}%{?dist} |
8 |
License: GNU GPL (GNU General Public License) |
9 |
Group: Applications/Archiving |
10 |
Source: %{name}-%{version}.tar.gz |
11 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
12 |
BuildArch: noarch |
13 |
AutoReq: no |
14 |
Requires: smeserver-release >= 7 |
15 |
Requires: perl-Filesys-DiskFree |
16 |
BuildRequires: e-smith-devtools |
17 |
Patch0: smeserver-affa-0.9.0-debugsshquiet.patch |
18 |
Patch1: smeserver-affa-0.9.0-defaultRemoteHostName.patch |
19 |
Patch2: smeserver-affa-0.9.0-dovecotDeleteNewStyleIndexFiles.patch |
20 |
|
21 |
%description |
22 |
Main purpose ist to make the SME server a dedicated rsync based backup server. |
23 |
Also providing functions to backup to USB disks or SMB shares in SOHO environments. |
24 |
|
25 |
%changelog |
26 |
* Mon Mar 03 2008 Michael Weinberger 0.9.0-5 |
27 |
- delete new style Dovecot's index files dovecot.index* |
28 |
- delete dovecot index files on remote server in --full-restore |
29 |
|
30 |
|
31 |
* Fri Feb 29 2008 Michael Weinberger 0.9.0-4 |
32 |
set localhost as default remoteHostName in /etc/e-smith/templates//etc/cron.d/affa/00jobs |
33 |
|
34 |
* Wed Feb 27 2008 Michael Weinberger 0.9.0-3 |
35 |
removed %post from spec file |
36 |
|
37 |
* Sat Feb 02 2008 Michael Weinberger 0.9.0-2 |
38 |
Bugfix: Report db was not deleted in deleteJob() |
39 |
don't use -q on ssh commands with Debug=yes |
40 |
|
41 |
* Fri Feb 1 2008 Shad L. Lords <slords@mail.com> 0.9.0-1 |
42 |
- Fix specfile for building in new buildsystem |
43 |
|
44 |
* Fri Jan 18 2008 Michael Weinberger |
45 |
Version 0.9.0 |
46 |
Bugfix: run cronSetup() after job delete |
47 |
Throw error if nothing was backed up (empty archive) |
48 |
Added rsyncd support for backing up Windows/Cygwin |
49 |
Added option and property remoteOS. Which remoteOS=cgywin the |
50 |
send key and revoke key functions use the right path to the |
51 |
authorized_keys2 file and login as user Administrator |
52 |
|
53 |
* Sat Dec 29 2007 Michael Weinberger |
54 |
Version 0.8.1 |
55 |
Automount Bugfix [Bug 3165]: Only exit with error on mount failure |
56 |
when in backup run. Otherwise log the error and continue. |
57 |
|
58 |
* Thu Dec 20 2007 Michael Weinberger |
59 |
Version 0.8.0 |
60 |
added bash completion script |
61 |
added option --kill JOB |
62 |
improved INT and TERM signal handling |
63 |
replaced all scp commands by rsync |
64 |
added poperty BandwidthLimit (unit KBytes/sec) |
65 |
each job write its own known hosts entry using ssh option HostKeyAliasOption |
66 |
affa --send-key w/o arguments sends the keys for all jobs |
67 |
removed Property StrictHostKeyChecking |
68 |
UPDATE FROM VERSIONS<8: run the command 'affa --send-key' to generate |
69 |
the known hosts entries for all jobs |
70 |
|
71 |
* Wed Dec 12 2007 Michael Weinberger |
72 |
Version 0.7.0 |
73 |
Modified logging: Job run logs to /var/log/affa/JOBNAME.log, all other |
74 |
to /var/log/affa/affa.log |
75 |
Bugfix: Check error status of --send-key and --revoke-key |
76 |
New: Options --show-schedule |
77 |
Modified: Option --list-archives now accepts multiple args or none |
78 |
Fix: install watchdog on source server before every run not only scheduled, |
79 |
to avoid watchdog triggered if a non-scheduled run take to long time. |
80 |
|
81 |
* Wed Nov 28 2007 Michael Weinberger |
82 |
Version 0.6.8 |
83 |
Bugfix: Automount was done too late. Daily backup never ran. |
84 |
|
85 |
* Wed Nov 21 2007 Michael Weinberger |
86 |
Version 0.6.7 |
87 |
Bugfix: Size and No. of files were not shown in --status |
88 |
Improved deleting of directories |
89 |
added --check-connections option |
90 |
Increased width of job column in --stats table |
91 |
|
92 |
* Sun Nov 11 2007 Michael Weinberger |
93 |
Version 0.6.6 |
94 |
Property rsync--modify-window added |
95 |
Modified recursive deleting directories |
96 |
|
97 |
* Wed Nov 07 2007 Michael Weinberger |
98 |
Version 0.6.5 |
99 |
ssh options added to scp commands |
100 |
added post-backup event |
101 |
|
102 |
* Wed Aug 08 2007 Michael Weinberger |
103 |
Version 0.6.4 |
104 |
delete dovcot index files after a --rise |
105 |
|
106 |
* Thu Jul 05 2007 Michael Weinberger |
107 |
Version 0.6.3 |
108 |
Bugfix: with RPMCheck=yes the affa-rpmlist was not found in the |
109 |
archive. Wrong path to schedule.0 instead of scheduled.running. |
110 |
Side effect of changes in version 0.5.0. [Bug 3128] |
111 |
|
112 |
* Tue Jul 03 2007 Michael Weinberger |
113 |
Version 0.6.2 |
114 |
Bugfix: Filesys::DiskFree requires $ENV{LANG}="en_US" [Bug 3119] |
115 |
Bug reported to bug-Filesys-DiskFree [at] rt.cpan.org |
116 |
|
117 |
* Mon Jun 25 2007 Michael Weinberger |
118 |
Version 0.6.1 |
119 |
Fix 3080 was not applied. |
120 |
|
121 |
* Mon Jun 18 2007 Michael Weinberger |
122 |
Version 0.6.0 |
123 |
- Replaced Filesys::DiskSpace by Filesys::DiskFree as the latter |
124 |
supports CIFS file system |
125 |
- using Filesys::DiskFree->mount and ->device instead of scanning /proc/mounts |
126 |
- mkdir RootDir only on job run to avoid making it in an unmounted mountpoint |
127 |
|
128 |
* Mon Jun 18 2007 Michael Weinberger |
129 |
Version 0.5.2 |
130 |
- Sending ssh key failed. When grep returned an error |
131 |
the mv command was not executed. Using ';' instead of '&&' |
132 |
for chaining commands. [Bug 3080] |
133 |
- /root/.ssh/authorized_keys2: No such file or directory warning. |
134 |
Run a touch to guarantee, that the file exists. [Bug 3080] |
135 |
- same issue with --revoke-key |
136 |
|
137 |
* Thu Jun 14 2007 Michael Weinberger |
138 |
Version 0.5.1 |
139 |
- Bugfix automount: getStatus() unmounts the device while a job is running |
140 |
- Status table: Last=never, if there are no archives at all |
141 |
|
142 |
* Tue Jun 12 2007 Michael Weinberger |
143 |
Version 0.5.0 |
144 |
- New property AutomountOptions |
145 |
- status table: grouped disabled jobs. Show Last='-' for disabled jobs |
146 |
instead of 'failed' |
147 |
- unlink lockfile in getLock() |
148 |
- Changes to improve robustness in case of network outage: |
149 |
- writing to a temporary archive scheduled.running and linkdest |
150 |
against the latest existing archive (usually scheduled.0). Then |
151 |
shift archives and rename scheduled.running to scheduled.0 |
152 |
- scheduledKeep=1 is now allowed |
153 |
- also check connection in daily,weekly etc., not only in scheduled run |
154 |
- don't run daily, weekly, monthly or yearly, when scheduled.0 doesn't exist. |
155 |
- new option --revoke-key |
156 |
- added optional option --revoke-key to --delete-job |
157 |
- avoid multiple adding public key to authorized_keys2 on source server |
158 |
|
159 |
* Wed Jun 06 2007 Michael Weinberger |
160 |
Version 0.4.7 |
161 |
- use StrictHostKeyChecking=no in sendKeys() |
162 |
|
163 |
* Tue Jun 05 2007 Michael Weinberger |
164 |
Version 0.4.6 |
165 |
- mailtest: Send also a testmail from the remotehost, when property Watchdog=yes |
166 |
- removed useless code in mailTestWatchdogRemote() |
167 |
|
168 |
* Mon Jun 04 2007 Michael Weinberger |
169 |
Version 0.4.5 |
170 |
write job config file to the archive dir |
171 |
|
172 |
* Thu May 31 2007 Michael Weinberger |
173 |
Version 0.4.4 |
174 |
- added property StrictHostKeyChecking (ssh option) |
175 |
- string comparison instead of numric for $job{'doneYearly'} ne $thisYear etc. |
176 |
|
177 |
* Wed May 30 2007 Michael Weinberger |
178 |
Version 0.4.3 |
179 |
- Minor bugfixes: |
180 |
calculation of RootDirFilesystemUsage in .AFFA-REPORT |
181 |
improved error handling with rsync status and df in DiskspaceWarn() |
182 |
|
183 |
* Thu May 29 2007 Michael Weinberger |
184 |
- Version 0.4.2 |
185 |
Infinite loop in execPostJobCommand() if command could not be executed: |
186 |
Don't call execPostJobCommand() in affaErrorExit() if err==115 |
187 |
- RPMCheck property was ignored |
188 |
- added Property chattyOnSuccess |
189 |
- modified jobconfig-sample.pl to preserve 'doneDaily','doneWeekly', |
190 |
'doneMonthly','doneYearly' and 'chattyOnSuccess' |
191 |
- write error codes of affaErrorExit() to log |
192 |
|
193 |
* Thu May 24 2007 Michael Weinberger |
194 |
- Version 0.4.1 |
195 |
- fixed bug in disk usage calculation |
196 |
|
197 |
* Tue May 22 2007 Michael Weinberger |
198 |
- Version 0.4.0 |
199 |
- added option --rename-job |
200 |
- changed syntax of --send-keys |
201 |
- added option --move-archive |
202 |
|
203 |
* Sun May 20 2007 Michael Weinberger |
204 |
- Version 0.3.3 |
205 |
- rebuild cronjobs after rise/undorise |
206 |
- ignore job of own backup, when creating cronjobs (job appears after a rise run) |
207 |
|
208 |
* Sun May 20 2007 Michael Weinberger |
209 |
- Version 0.3.2 |
210 |
- man: added sshPort propperty |
211 |
- chdir /tmp to avoid cwd warnings when the cwd disappears while |
212 |
running rise or undo rise |
213 |
- bugfix: undorise() did not found own backup archive. Was searching for a wrong name |
214 |
|
215 |
* Wed May 16 2007 Michael Weinberger |
216 |
- Version 0.3.1 minor bugfixes |
217 |
- checkCrossFS() did not work (used in --rise) |
218 |
- jobconfig-sample.pl: deleting record before setting props |
219 |
- Perl errors with --status before a job run |
220 |
|
221 |
* Thu May 10 2007 Michael Weinberger |
222 |
- Version 0.3.0 |
223 |
- man page completed |
224 |
- mark archives with indices > keep setting with '*' in --list-acrchive output |
225 |
- Option --delete-job |
226 |
- Option --cleanup |
227 |
- added --job=JOB alternative to --send-keys |
228 |
|
229 |
* Wed May 09 2007 Michael Weinberger |
230 |
- Version 0.2.0 |
231 |
- added --mailtest option |
232 |
|
233 |
* Tue May 08 2007 Michael Weinberger |
234 |
- Version 0.1.5 |
235 |
- improved --status output |
236 |
- removed options --report and --send-report |
237 |
- added option --show-archives |
238 |
- added --csv for status and show-archives output in CSV format |
239 |
- added property 'sshPort' |
240 |
|
241 |
* Mon May 07 2007 Michael Weinberger |
242 |
- Version 0.1.4 |
243 |
- don't install the remote watchdog, when remotehost is eq localhost |
244 |
- improved check for remoteHostName eq localhost using DNS |
245 |
- ssh -o PasswordAuthentication=no in checkConnection() |
246 |
- added --full-restore |
247 |
- missing check for HOSTNAME argument in --send-keys added |
248 |
improved error check |
249 |
- prevent run of --rise of localhost from own backup |
250 |
|
251 |
* Mon Apr 30 2007 Michael Weinberger |
252 |
- Version 0.1.3 |
253 |
modified 'use constant* syntax in watchdog script for compatibility |
254 |
with perl 5.6 on SME6 |
255 |
|
256 |
* Fri Apr 27 2007 Michael Weinberger |
257 |
- Version 0.1.2 |
258 |
Bugfix: Preserve of ethernet driver setting with --rise did not work. |
259 |
Also preserve NIC bonding. |
260 |
|
261 |
* Mon Apr 23 2007 Michael Weinberger |
262 |
- Version 0.1.1 |
263 |
scheduledKeep must be>=2 for --link-dest |
264 |
set scheduledKeep to 2 if <2 |
265 |
- get lastrun date from affa-report rather than from report file |
266 |
- added auto mount function |
267 |
- added AutomountDevice and AutomountPoint to jobconfig-sample.pl |
268 |
|
269 |
* Wed Apr 18 2007 Michael Weinberger |
270 |
- Version 0.0.8 |
271 |
dont die if report db does not exist |
272 |
|
273 |
* Wed Apr 18 2007 Michael Weinberger |
274 |
- Version 0.0.7 |
275 |
run checkConnection() only for scheduled backups |
276 |
added Size and Disk usage information to --status |
277 |
|
278 |
* Tue Apr 17 2007 Michael Weinberger |
279 |
- Version 0.0.7 |
280 |
print Servername in --status output |
281 |
|
282 |
* Thu Apr 12 2007 Michael Weinberger |
283 |
- Version 0.0.5 |
284 |
fixed calculation of lastrun-now |
285 |
|
286 |
* Thu Apr 12 2007 Michael Weinberger |
287 |
- Version 0.0.4 |
288 |
- added --send-status plus templates |
289 |
- fixed format error of times in affa --status |
290 |
- show 'failed', if lastrun is older 1 day in affa --status |
291 |
- fixed typo. default status=disabled (was disable) |
292 |
|
293 |
* Fri Apr 06 2007 Michael Weinberger |
294 |
- Version 0.0.3 |
295 |
- watchdog reminder was not deleted on soure |
296 |
- wrong version mismatch list in rpm compare |
297 |
|
298 |
* Thu Apr 05 2007 Michael Weinberger |
299 |
- added 'rsync--inplace' property |
300 |
|
301 |
* Mon Apr 02 2007 Michael Weinberger |
302 |
- initial release |
303 |
|
304 |
%prep |
305 |
%setup -q -n %{name}-%{version} |
306 |
%patch0 -p1 |
307 |
%patch1 -p1 |
308 |
%patch2 -p1 |
309 |
|
310 |
%build |
311 |
|
312 |
%install |
313 |
rm -rf $RPM_BUILD_ROOT |
314 |
rm -f %{name}-%{version}-filelist |
315 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
316 |
|
317 |
perl createlinks $RPM_BUILD_ROOT |
318 |
|
319 |
# Set version String |
320 |
cp -a $RPM_BUILD_ROOT/sbin/e-smith/affa $RPM_BUILD_ROOT/sbin/e-smith/affa.tmp |
321 |
VERSIONSTRING=%{version}-`echo %{release}|sed -e 's/\..*$//'` |
322 |
sed -e "s/_VERSIONSTRING_/$VERSIONSTRING/" < $RPM_BUILD_ROOT/sbin/e-smith/affa.tmp > $RPM_BUILD_ROOT/sbin/e-smith/affa |
323 |
rm -f $RPM_BUILD_ROOT/sbin/e-smith/affa.tmp |
324 |
|
325 |
rm -f %{name}-%{version}-filelist |
326 |
|
327 |
find $RPM_BUILD_ROOT -depth -type f -print |\ |
328 |
sed -e "s@^$RPM_BUILD_ROOT@@g" \ |
329 |
-e "s@^/sbin/e-smith/@%attr(0750,root,root) &@"\ |
330 |
-e "s@^/etc/profile.d/@%attr(0755,root,root) &@"\ |
331 |
-e "s@^/etc/e-smith/templates/@%attr(0644,root,root) &@"\ |
332 |
>> %{name}-%{version}-filelist |
333 |
|
334 |
find $RPM_BUILD_ROOT -depth -type l -print |\ |
335 |
sed "s@^$RPM_BUILD_ROOT@@g" >> %{name}-%{version}-filelist |
336 |
|
337 |
%clean |
338 |
rm -rf $RPM_BUILD_ROOT |
339 |
exit 0 |
340 |
|
341 |
|
342 |
%files -f %{name}-%{version}-filelist |
343 |
%defattr(-,root,root) |