Question, then background behind the question:
We use Low Variables. When would the database overwrite our variable files on the server instead of the files overwriting what's in the database?
Background: Bitbucket had (is having) some issues. To push our sites from dev to staging we have a script that dumps the database, commits and pushes to our dev branch, merges with our staging and then pushes our staging, then checks the dev branch back out so that we are always on dev, the database that was dumped is then imported into the staging database.
This typically works great, except what seems to have happened yesterday is that our script pushed our dev branch, however since was Bitbucket was having issues, it seems that when we checked the dev branch back out it checked out an old commit. In hindsight there were a lot of things we could have done (gone through our local git -log, etc), however did I mention that this was a site for a local college and we were presenting it to the faculty 3 hours after this happen?
So it seems that when that happened, and we then ran the site, that ExpressionEngine took what was in the variable files and overwrote what was in our database. This is typically what I would expect. However after we pulled in all the files from the backup from the previous night (actual nightly file and database backups we run, not git), it seemed that the database was then overwriting our variables. We knew that the files were good (again, in hind-sight I should have reverted the database as well), however when we looked at the variables in EE and then the actual files they were bad. It was until I pulled the backup files into a non-EE folder, then manually copied the text from one into the files in the EE install that the files saved correctly and the proper variable files were in EE.
Also, it seems that only the variables were over written, not any templates. I'm just trying to understand what could have happened and how / when the whole syncing process works.
thanks
In Hindsight:
- we should have done a full restore from the files/database backup to nip this in the butt
- we should have looked at our local git repository for the log and what was committed before instead of just relying on Bitbucket
- I've repeatedly stated that we shouldn't be making changes the day of presentations. Once again I got vetoed.