When your nails database is corrupted or there is an issue shrinking the database, use the following steps to create a new nailsd.db database:
- Open a command-line session on your server.
- Stop the nails service using the following command:
service nails stop
- Copy the old database to a temporary location using the following command:
cp /var/opt/NAI/LinuxShield/etc/nailsd.db /tmp/nailsd.db
- Remove the database using the following command:
rm /var/opt/NAI/LinuxShield/etc/nailsd.db
- Create the new database using the following command:
sh /opt/NAI/LinuxShield/bin/mknailsdb /var/opt/NAI/LinuxShield/etc/nailsd.db
- Start the nails service using the following command:
service nails start