Day 5 – GitHub Backups and the .env Scare
Today’s Build Log:
Hi, this is G again.. I was not able to post this build log about learning backups because I had to take care of my doggo who got sick last week. Now, he is fine and able to eat and poop well. He has been with me for 9 years when I was undergoing depression so he is my top priority. Attached a pic of Matteo, my not-so-little doggie. 😍
Past few days, I set up my first GitHub backup for the server. A simple idea — but the execution almost went sideways. Whenever I look at Github, I see a foreign language. Who would have thought I start using it and learning along the way. LOL
Anyway, backing up is basic common sense, right? Especially after yesterday’s lockout scare. I knew I needed a safety net. Something that would let me recover from mistakes, roll back bad changes, or just keep track of how my server evolved over time.
So I set up a private GitHub repo. Connected my server using SSH keys. Started pushing my config files, scripts, and Docker setups.
It felt great — until I noticed something.
My .env file was about to be committed.
All my sensitive API keys. My database credentials. My private webhook URLs. Everything.
One accidental push, and my entire stack would’ve been exposed. Publicly.
Panic.
But ChatGPT came to the rescue again.
“Make sure you have a .gitignore file. Add .env to it immediately.”
I did. Stopped the commit. Removed the secrets. Added a clean .env.example instead — a safe template without real values.
Disaster avoided.
That was the moment I realized — even a safety net can be a threat if you don’t know how to use it properly.
Now I’ve set up GitHub backups the right way. Every day at 2AM, a cron job pushes all my server configs to my private repo. Clean, safe, and automatic.
💡 Today’s Lesson: Backups aren’t just about having a copy. They’re about knowing what not to copy. Always have a .gitignore — and double-check what’s in your commits.
💬 Question for You: Ever had a close call with your credentials or API keys? Did you fix it in time?
3
1 comment
Gian Gallegos
6
Day 5 – GitHub Backups and the .env Scare
AI Automation Society
skool.com/ai-automation-society
A community built to master no-code AI automations. Join to learn, discuss, and build the systems that will shape the future of work.
Leaderboard (30-day)
Powered by