DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 12th November 2021
ohmpr ohmpr is offline
Port Guard
 
Join Date: Feb 2021
Posts: 20
Default config files and htdocs lost, recommended names and locations

hi,
I've been setting up an OpenBSD web server as i have time, over several months now. I had httpd and relay setup and serving my php and nim web apps. It's been a while since i've even looked at it, but yesterday (in a careless whim, evidently) i thought i'd upgrade it to 7.0 from 6.9 so i quickly read the upgrade guide and ran sysupgrade. Everything went fine from what i could tell over ssh, but now httpd, relayd and mysqld fail to start. Investigating, i see /etc/httpd.conf, /etc/relayd.conf, and, for example, /var/www/htdocs/myapp1, /var/www/htdocs/myapp2 are all gone.

Also, somehow, it looks like i never backed up any of this...

So, besides my mistake (or sabotage from inter-dimensional doppelganger?) in not backing up, i'm wondering if i'm missing something about how OpenBSD handles release upgrades in regards to how it handles config files, htdocs and any other data. I assumed OpenBSD would leave any customized, or manually created, config files alone, along with my htdocs. Maybe i'm supposed to have config files in some other location besides /etc, or named in some particular way? Though, i still can't imagine why it would delete htdocs data...

I also don't even know for sure that this data loss happened during the upgrade, because i didn't even think to check the then current status prior to running sysupgrade. I know, another "BOOO!" to me...

so, long story short, i'm just wondering what i am supposed to do differently (besides having a backup) so i won't lose my configs and htdocs in the future.

thanks
Reply With Quote
  #2   (View Single Post)  
Old 12th November 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 8,020
Default

I'm sorry for your loss. Of data.

It happens to all of us. Which is why everyone eventually backs their stuff up -- so it won't happen to us again. And the truly paranoid among us test recovery procedures, to make sure we can get our data back.

---

I'm thinking the root cause may have been through the execution of sysmerge(8) -- either when it ran automatically by rc.firsttime(8) after the upgrade, or your interactive responses to it if you ran it manually.

The upgrade produces logs that are sent to root mail, so see if there is anything in root's inbox and review those logs carefully for any clues.
Reply With Quote
  #3   (View Single Post)  
Old 12th November 2021
ohmpr ohmpr is offline
Port Guard
 
Join Date: Feb 2021
Posts: 20
Default

thanks for your response. everything looks fine to me in the mail/logs.

So, i'm not supposed to have to do anything special for config files, nor htdocs, to keep them from being erased or written over?
Reply With Quote
  #4   (View Single Post)  
Old 12th November 2021
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 307
Default

I dont know what happened but /var/backups might have your old config files.

Config files should not have been deleted unless you told sysmerge to do it.

Not sure how htdocs would have been touched unless you had it as another partition mounted there and your fstab was changed and it's simply not mounted.
Reply With Quote
  #5   (View Single Post)  
Old 12th November 2021
ohmpr ohmpr is offline
Port Guard
 
Join Date: Feb 2021
Posts: 20
Default

sysmerge only asked about sshd and that still works. /var is the only var partition and it's mounted. thanks for that idea, though.

I'm starting to think this happened prior to the upgrade and i just didn't notice.
Reply With Quote
Reply

Tags
upgrade, webserver

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Case in file names stanl OpenBSD General 9 13th March 2020 08:01 AM
Package lists/Config files for Lightweight Desktop/Funding Option shep Feedback and Suggestions 1 16th December 2013 07:24 PM
setting up ftp to allow /var/www/htdocs ershiba OpenBSD General 4 15th January 2013 07:34 AM
Webalizer doesn't do locations Mantazz FreeBSD Ports and Packages 1 20th December 2010 06:13 PM
Multiple Locations divadgnol67 OpenBSD General 3 7th October 2010 04:20 PM


All times are GMT. The time now is 06:19 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick