There are a couple different options for undeleting files for XFS filesystems.
TestDisk
TestDisk is a great command line recovery tool. Unfortunately, it can be slightly more difficult on systems using XFS compared to EXT4 systems. TestDisk does not support undeleting a file in place on XFS.
You can still recover files using TestDisk, you just need to recover the whole drive and dig through the recovery results to find the files you want.
xfs_undelete
There is also another utility that can be helpful. xfs_undelete
You will need a different filesystem to save the files to. Otherwise you will receive the following error.
Your output directory is /home/bob/recovery/
That is within the filesystem / you want to recover files
from. This isn't feasible as it would overwrite the deleted files you wanted to
recover. Please specify the option -o /path/to/output_directory on another (rw
mounted) filesystem or run xfs_undelete from within a directory on that
filesystem so the recovered files could be written there. They cannot be
recovered in place.
It’s not the greatest idea to recover on the system while running. Ideally, shut the system down, plug the drive into another machine as read only, and copy the files off.
You could also boot up in single user mode or a live Linux iso/thumbdrive and mount another recovery drive. Should work for both physical and virtual environments.
These steps should be similar across Red Hat type distros.
Before we proceed, lets stop SNMP
sudo systemctl stop snmpd
Disable SNMP Versions 1 and 2c
First we are going to disable SNMP v1 and v2c
You can manually edit the /etc/snmp/snmpd.conf file and comment out or delete every line starting with com2sec, group, access. Or you can run the following sed commands to change it for you.
sudo sed -i 's/^com2sec/# com2sec/g' /etc/snmp/snmpd.conf sudo sed -i 's/^group/# group/g' /etc/snmp/snmpd.conf sudo sed -i 's/^access/# access/g' /etc/snmp/snmpd.conf
If you are running a firewall, you will need to allow an exception for SNMP, UDP port 161. You may also need to allow an SELinux exception. Check out the last portion of both these articles.
Started getting the following error while running ./validate.php for LibreNMS
Cannot load Zend OPcache - it was already loaded
Looks like the problem arises out of PHP trying to load two ini files for OPcache. Was trying to enable OPcache for LibreNMS so I created an opcache.ini file and put the settings in it. I missed the default 10-opcache.ini file.
Moving all the settings into the 10-opcache.ini file and deleting the created opcache.ini file resolved the issue for me.
2023 Update: Recent versions of REHL have completely disabled DES which can cause issues even when using the +ssh-rsa or +ssh-rsa. You can use the following command to enable SHA1, however, upgrading the server would be recommended.
update-crypto-policies --set DEFAULT:SHA1
Reason for it not working is some of the older weaker SSH encryption algorithms have been disabled. You can allow ssh to use it by specifying the following option.