1 |
diff -Nur --no-dereference smeserver-zabbix-server-0.1.old/createlinks smeserver-zabbix-server-0.1/createlinks |
2 |
--- smeserver-zabbix-server-0.1.old/createlinks 2022-08-01 14:17:20.160000000 -0400 |
3 |
+++ smeserver-zabbix-server-0.1/createlinks 2022-08-01 14:25:21.109000000 -0400 |
4 |
@@ -59,6 +59,7 @@ |
5 |
/usr/share/zabbix/.user.ini |
6 |
/etc/systemd/system-preset/49-koozali.preset |
7 |
/etc/opt/remi/php74/php-fpm.d/www.conf |
8 |
+ /etc/backup-data.d/smeserver-zabbix-server.include |
9 |
|
10 |
)); |
11 |
|
12 |
diff -Nur --no-dereference smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/backup-data.d/smeserver-zabbix-server.include/template-begin smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/backup-data.d/smeserver-zabbix-server.include/template-begin |
13 |
--- smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/backup-data.d/smeserver-zabbix-server.include/template-begin 1969-12-31 19:00:00.000000000 -0500 |
14 |
+++ smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/backup-data.d/smeserver-zabbix-server.include/template-begin 2022-08-01 14:24:51.635000000 -0400 |
15 |
@@ -0,0 +1,21 @@ |
16 |
+#Only non rpm owned files are backupe there |
17 |
+{ |
18 |
+use RPM2; |
19 |
+my $rpm_db = RPM2->open_rpm_db(); |
20 |
+ |
21 |
+my @dirs = qw( |
22 |
+/etc/zabbix |
23 |
+/etc/zabbix/zabbix_agentd.conf.d/ |
24 |
+/var/lib/zabbix/bin/ |
25 |
+); |
26 |
+ |
27 |
+foreach my $some_dir (@dirs) { |
28 |
+ next unless ( -e $some_dir ); |
29 |
+ opendir(my $dh, $some_dir) || die "Can't open $some_dir: $!"; |
30 |
+ while ( (my $file = readdir $dh) ) { |
31 |
+ next if $file =~ /^\.{1,2}$/; |
32 |
+ $OUT .= "$some_dir/$file\n" unless $rpm_db->find_by_file("$some_dir/$file"); |
33 |
+ } |
34 |
+ closedir $dh; |
35 |
+} |
36 |
+} |