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