← sources

How to back up .env file?

source: reddit (reddit:devops)published 2026-06-05 18:13ingested 2026-06-06 08:28

retained text

<!-- SC_OFF --><div class="md"><p>I've got a couple scripts that need secret values, which works great in GitHub Actions. For local development, they read the secrets from environment variables and I've got them defined in a gitignored .env file.</p> <p>My question is, how to back up my copy of the local .env file, in case I ever need to reclone the repo or switch machines? Some people have suggested password managers, but I'm not sure that makes sense to me bc I'm trying to back up a file, not a single password.</p> </div><!-- SC_ON --> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Own_Goose_7333"> /u/Own_Goose_7333 </a> <br /> <span><a href="https://www.reddit.com/r/devops/comments/1txstx6/how_to_back_up_env_file/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/devops/comments/1txstx6/how_to_back_up_env_file/">[comments]</a></span>

document fetched 2026-06-06 08:28