Accidentally deleted /var/db/ports... Now what?

Hi,

I've probably done something really silly. After having done an incorrect cvsup sync (sending stuff to /var/db and to /home, copied a cvsup server config.) I tried to clean up the mess, in that process I've also deleted /var/db/ports.

Afterwards I found out this was the place where info on installed ports was located. Long story short, I'm trying to fix this issue.

Things I've tried was first manually installing a few applications that I've installed using this command:

[cmd=]# make FORCE_PKG_REGISTER=1 install clean[/cmd]

And from there, since I use portupgrade, I've tried running this command to update everything/reinstall (and configure) ports:

[cmd=]# portupgrade -arRCf[/cmd]

The problem however is that dependencies weren't "upgraded/reinstalled" which means that I have a relatively short list of ports when I check portversion.

An example is that I've installed Nagios which comes with Apache as dependency, in my list Apache isn't shown as an installed port while it has been installed on the system.

Because of that I'm currently hanging on a few choices:

  1. Find a way to rebuild /var/db/ports with all dependencies included
  2. Reinstall the OS since I'm still at the beginning of configuring the server
  3. This problem will fix itself over time so just continue configuring the server

Can anyone help me out with this choice? Is there a way to easily fix /var/db/ports or did I kind of break a few things that can't be fixed? Or will this fix itself over time?

Any insight would be much appreciated, thanks in advance.


Best regards,

Bart

p.s. I've learned my lesson and won't be doing this again, but I really hope theres a fix for this.
 
In the big scheme of things, /var/db/ports is not very essential. All it contains are the options that were chosen during the installation of ports (the blue config screen (make config)). E.g. the options chosen for Apache will be in /var/db/ports/apache22/options. All installed ports will continue to work normally. When reinstalling them you should get the config screens again. Hopefully you remember which were the correct options again, if you even deviated from the defaults for any of them, that is. Another hopeful message would be: make backups! And whatever you do, make sure you don't delete /var/db/pkg, because that would really hurt much more than this.
 
Thanks for the reply's, I have to confess that I was initially assuming that /var/db/ports was the culprit but (shame on me) in the process of "cleaning up the mess" I've also rid myself of /var/db/ports. . .

Since I have a more clear direction to look for now I've tried "rebuilding" this using pkgdb, hopefully it will work. If not then I might as well reinstall the server, troubleshooting is costing me too much time where a reinstall would take allot less time.

After it's all working properly I'll make sure that the back-ups are working and that I don't forget /var/db.

Thanks for all the help.
 
Back
Top