#Only non rpm owned files are backupe there
{
use RPM2;
my $rpm_db = RPM2->open_rpm_db();

my @dirs = qw(
/etc/zabbix
/etc/zabbix/zabbix_agentd.conf.d/
/var/lib/zabbix/bin/
);

foreach  my $some_dir  (@dirs)  {
  next unless ( -e $some_dir );
  opendir(my $dh, $some_dir) || die "Can't open $some_dir: $!";
  while ( (my $file = readdir $dh) ) {
    next if $file =~ /^\.{1,2}$/;
    $OUT .= "$some_dir/$file\n" unless $rpm_db->find_by_file("$some_dir/$file");
  }
  closedir $dh;
}
}
