That's why you put your config files in a git repository
linuxmemes
Hint: :q!
Sister communities:
- LemmyMemes: Memes
- LemmyShitpost: Anything and everything goes.
- RISA: Star Trek memes and shitposts
Community rules (click to expand)
1. Follow the site-wide rules
- Instance-wide TOS: https://legal.lemmy.world/tos/
- Lemmy code of conduct: https://join-lemmy.org/docs/code_of_conduct.html
2. Be civil
- Understand the difference between a joke and an insult.
- Do not harrass or attack members of the community for any reason.
- Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
- Bigotry will not be tolerated.
- These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
3. Post Linux-related content
- Including Unix and BSD.
- Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of
sudo
in Windows. - No porn. Even if you watch it on a Linux machine.
4. No recent reposts
- Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.
Please report posts and comments that break these rules!
Sounds like Nixos with extra steps
What do you mean? My NixOS config files are in a git repository
Even the system files like those in /etc ?
Of course there is. Love it.
No. I only set up /etc/fstab and /etc/ssh/sshd_config once and they will never change.
Package manager: This package contains an updated sshd_config file, would you like to replace your existing file with the package maintainer's updated file?
Me, every time: LOL, no
Shit, thanks for reminding me. I needed to take care of some pacdiff files
Yes. I use a hacky script to copy them to the right place
I do the same thing.
You could set up btrfs snapshots, too. Of course, don't forget to take a snapshot before you break your configs.
BAK IN MY DAY 👵👴
Yep I still add .bak to mine
Evolution:
- config.json
- config.json.bak
- config.json.bak.old
- config.json.bak.old2
- config.json.bak.old3.stillworks
- config.json.bak.old3.stillworks.DONTUSETHIS
- config.json_(redownloaded_from_source)
Sigh...
git revert HEAD
echo \*.json.\* >> .gitignore
git commit
- config.json.almost
- config.json.broken
- config.json.shouldwork
config.conf
config.conf.backup
config.conf.testing
config.conf.old
config.conf.default
config.conf.example
. . . (sigh...)
True story... happens all the time.
Gmail says sending myfile.zip is not allowed.
Change it to myfile.zip.txt and everything is fine.
It may be due to their processing.
Better base64 -w 0 myfile.zip > myfile.zip.txt
If it works though ¯\_(ツ)_/¯
Speaking of which, nowadays KDE hides files with these extensions for some reason
It's just a playful thing dolphins do 😊.
Rename to .old
Bam file is gone.
??? Confused look.
The heck?
Ctrl + h
Oh there it is!
I never really have hidden files off, so I wasn't even aware dolphin does this lol
An old manager of mine's backup solution was a cronjob that appended .old to every file then made a copy of the most recent one. So he had: file, file.old, file.old.old, file.old.old.old, ...
.bkp_YYYYMMDD for me
Ah, yes, I also add dates sometimes, very helpful 👍.
And then wonder "wtf did I change them 🤔".
Config files need git nowadays.
Is there a tool to version your configs? I use chezmoi for my dotfiles but that doesn't help system configs
Etckeeper
Fuck it. What's the worst that could happen?
Oh.
I like adding a backup function to .profile that can take a file or list of files as an argument and make a copy with a date suffix on the file name, and same date additional backups just add a character like ~ at the end. It's in version control, but if I'm testing a change it's just faster to restore the file from a copy in the same place.
i so agree. i have a script that copies all file arguments into the directory .backups/YYYY-mm-DD-HHMM/
... handy for risky git operations too.
Bet the world would be a happier place if we had cartoon physics
Lower gravity by 20x, bam, instant cartoon physics.
Acceleration would be 0.50 m/s^2
*~
But you should really have a backup system. And often you should have a version control system too.
Use etc-keeper, saves everything in a git repo and integrates with a bunch of package managers. Been using it for decades it feels like now.