Remember your backups, kids

We've all been there. Document-FINAL-V4-ACTUAL-FINAL-COPY(3)-LATEST.docx. Our desktops looking like a virus running rampant as it duplicates documents. Spending 20 minutes at the end of the project just to find which document was actually the final version. You plug the memory stick in and copy the file across, gallantly speed across to your nearest printer, plug in the stick, and see 2 dreadful words. "File Corrupted." You open your laptop, and find that the definitely legitimate copy of Shrek the Third you were downloading included some ransomware, all the copies are gone, and you are suddenly left with 2 hours until deadline, none of your 5000 word document, and you can't even lighten your mood by checking what antics Donkey has gotten up to. Ok, the metaphor has become a bit belaboured, but my point remains. At some point or another, we've all fucked up with backups.

I will say now, the game is fine, I have not lost game data.

The reason I bring this up is that, you can probably see that the website looks somewhat different. So, I was introducing a Plex server into my Docker stack. Now, I was under the assumption that, when running docker-compose, your volumes would remain. To an extent, they did. The problem arises when the volumes never existed in the first place. I had made a typo when configuring the volumes meaning that nothing was being persisted. Now, I had also noticed that there was some issues with my compose file, so I changed some bits. The idea being that my file should be nicely formatted and I should clean up the folder structure for the volumes. In doing this, I shut down the existing containers and moved across what I thought was the nice and full data from my webpage and copied it into the new location, before re-running docker-compose up and recreating the images. My images were created, I checked my Gitea instance, and that was fine. Ok, good stuff. So I come onto the blog to create a nice write-up of how I added Gitea and Plex, and how maybe my initial impression of Docker was unfounded, and we should spend our lives in containers instead. However as I plugged in my URL, I found a set up page for the CMS. Oh no.

Now I thought "No big deal, I copied the volumes but didn't delete the originals precisely in case this happened", and opened up my connection to the server. I opened the original volume folder and... blank. Oh fuck. I start panicking, searching for any trace of the volume data. Nothing. Now, me being me, of course I had my docker-compose.yml in a git repo. So I go and check it. Look back a couple of commits to before I added the Gitea instance, and there it is. I had missed a / in the volume name. I can't even remember where it was at this point. I just recall being head in hands. The last backup I had before that was when I ported over to Docker, not long after I wrote my piece on Mini Metro. A bit upsetting, given I wrote several posts detailing mental health, my christmas break, and explaining that working 16hrs a day, or 60hrs a week, or working your weekends was an admission of suffering, not a flex. We live and learn, and in this case, I've learned to A) verify that your Docker container is correctly configured (yes, I have tested this time), and B) For the love of god, use backups properly. I've learned that lesson many many times before, and still, I fail to do so. Thank god that git does most of the hard work for me with code.

Silver linings is that the website looks a lot cleaner now, there's actual links to my Github and Twitter at the bottom, and it just generally looks better. I did want to refit this page, but not quite like this. You now can also steal my stack design from my Github. I'm now also adding fixed pages to do with the game, as well as a link to the Trello board. It's a clean and fresh start, so I hope you guys will approve too. I'll be uploading the recovered posts at some point soon, just so they're preserved.

As for the game, I left it alone for a bit as work got hectic, but have now picked it back up with reworking the map set up and procedural generation. I'll be updating on that soon enough. As always, the Trello board gives an indicator of what's going on.

Next Post