We've all been there...

I usually use .bak... .old seems so... old.

654 points · 57 comments · view on lemmy.world

57 Comments

d_k_bo@feddit.de · 68 pts · 2y (16 replies)

That's why you put your config files in a git repository

skulbuny@sh.itjust.works · 39 pts · 2y (1 reply)

Sounds like Nixos with extra steps

iopq@lemmy.world · 8 pts · 2y

What do you mean? My NixOS config files are in a git repository

stepan@lemmy.cafe · 15 pts · 2y (9 replies)

Even the system files like those in /etc ?

Prunebutt@slrpnk.net · 31 pts · 2y (3 replies)
QuarterSwede@lemmy.world · 9 pts · 2y

Of course there is. Love it.

PoolloverNathan@programming.dev · 4 pts · 2y (1 reply)
Prunebutt@slrpnk.net · 5 pts · 2y

I use NixOS btw ;)

exu@feditown.com · 6 pts · 2y (1 reply)

Yes. I use a hacky script to copy them to the right place

Rustmilian@lemmy.world · 2 pts · 2y
[ removed ]
d_k_bo@feddit.de · 6 pts · 2y (2 replies)

No. I only set up /etc/fstab and /etc/ssh/sshd_config once and they will never change.

herrcaptain@lemmy.ca · 9 pts · 2y (1 reply)

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

fossphi@lemm.ee · 3 pts · 2y

Shit, thanks for reminding me. I needed to take care of some pacdiff files

digdug@kbin.social · 4 pts · 2y (2 replies)

You could set up btrfs snapshots, too. Of course, don't forget to take a snapshot before you break your configs.

lud@lemm.ee · 1 pts · 2y (1 reply)

Wouldn't you need to use btrfs for that?

How well does btrfs work with full disk encryption?

loutr@sh.itjust.works · 2 pts · 2y

Works great on my laptop. It takes automatic snapshots before and after running the package manager, no problem so far.

dogsnest@lemmy.world · 2 pts · 2y
[ removed ]
bappity@lemmy.world · 46 pts · 2y (1 reply)

BAK IN MY DAY 👵👴

Chocrates@lemmy.world · 23 pts · 2y

Yep I still add .bak to mine

_______@poeng.link · 36 pts · 2y (3 replies)

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)
JasonDJ@lemmy.zip · 7 pts · 2y

Sigh...

git revert HEAD
echo \*.json.\* >> .gitignore
git commit
Deway@lemmy.world · 5 pts · 2y
  • config.json.almost
  • config.json.broken
  • config.json.shouldwork
user224@lemmy.sdf.org · 5 pts · 2y

config.conf
config.conf.backup
config.conf.testing
config.conf.old
config.conf.default
config.conf.example

nobleshift@lemmy.world · 17 pts · 2y (6 replies)
[ removed ]
user1234@lemmynsfw.com · 8 pts · 2y (4 replies)

That sounds like a virus.

bobs_monkey@lemm.ee · 9 pts · 2y (3 replies)

/usr/share/bin/notporn/seriously/definitelynotporn

user1234@lemmynsfw.com · 4 pts · 2y (2 replies)

FTFY: definitelynotpr0n

Don't want it to be easily searchable.

possiblylinux127@lemmy.zip · 4 pts · 2y (1 reply)

chmod 600

PoolloverNathan@programming.dev · 1 pts · 2y

chmod 000 and put the rest of the linux in a user namespace so not even root can see inside.

Konstant@lemmy.world · 1 pts · 2y
[ removed ]
dogsnest@lemmy.world · 15 pts · 2y (1 reply)

. . . (sigh...)

0x4E4F@sh.itjust.works · 4 pts · 2y

True story... happens all the time.

Knock_Knock_Lemmy_In@lemmy.world · 12 pts · 2y (1 reply)

Gmail says sending myfile.zip is not allowed.

Change it to myfile.zip.txt and everything is fine.

user224@lemmy.sdf.org · 4 pts · 2y

It may be due to their processing.
Better base64 -w 0 myfile.zip > myfile.zip.txt

If it works though ¯⁠\⁠_⁠(⁠ツ⁠)⁠_⁠/⁠¯

LaggyKar@programming.dev · 9 pts · 2y (5 replies)

Speaking of which, nowadays KDE hides files with these extensions for some reason

0x4E4F@sh.itjust.works · 20 pts · 2y (4 replies)

It's just a playful thing dolphins do 😊.

Johanno@feddit.de · 7 pts · 2y (3 replies)

Rename to .old

Bam file is gone.

??? Confused look.

The heck?

Ctrl + h

Oh there it is!

meekah@lemmy.world · 8 pts · 2y (2 replies)

I never really have hidden files off, so I wasn't even aware dolphin does this lol

jws_shadotak@sh.itjust.works · 2 pts · 2y (1 reply)

I absolutely despise the idea of "hidden" files. I don't understand the purpose of not showing them.

PoolloverNathan@programming.dev · 2 pts · 2y

It's useful to hide clutter. It's easier to look at the file you care about when the file~, file.old, .file.swp, #file#, file,v, etc. aren't in the way.

ahal@lemmy.ca · 8 pts · 2y (1 reply)

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, ...

0x4E4F@sh.itjust.works · 1 pts · 2y

lol 🤣🤣🤣

LordOfLocksley@lemmy.world · 7 pts · 2y (1 reply)

.bkp_YYYYMMDD for me

0x4E4F@sh.itjust.works · 2 pts · 2y

Ah, yes, I also add dates sometimes, very helpful 👍.

And then wonder "wtf did I change them 🤔".

Config files need git nowadays.

Chocrates@lemmy.world · 7 pts · 2y (1 reply)

Is there a tool to version your configs? I use chezmoi for my dotfiles but that doesn't help system configs

Nomad@infosec.pub · 11 pts · 2y

Etckeeper

Mouselemming@sh.itjust.works · 7 pts · 2y

I'm seeing this on oldsh.itjust.works, feels extra meta

https://oldsh.itjust.works/post/19853381

abadbronc@lemmy.world · 6 pts · 2y

Fuck it. What's the worst that could happen?

Oh.

Crow@lemmy.blahaj.zone · 6 pts · 2y (1 reply)

.bak is good, ranger even hides files with it

Tier1BuildABear@lemmy.world · 1 pts · 2y

This is what I've always used as well

whotookkarl@lemmy.world · 5 pts · 2y (2 replies)

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.

lseif@sopuli.xyz · 3 pts · 2y

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.

palordrolap@kbin.social · 2 pts · 2y

Obligatory note that /etc/profile and ~/.profile are only run by login shells, and many terminal emulators do not execute a login shell by default.

Unfortunately, there is no standard secondary place* that all shells execute, so check your chosen shell's manual for what it does run on startup and put your functions into one of those. Preferably one that goes in your homedir.

Alternatively have that file source ~/.profile assuming that won't cause an infinite loop.

* And not even a primary if you count *csh, but if you use those you have other problems.

Sam_Bass@lemmy.world · 3 pts · 2y (2 replies)

Bet the world would be a happier place if we had cartoon physics

0x4E4F@sh.itjust.works · 2 pts · 2y (1 reply)

Lower gravity by 20x, bam, instant cartoon physics.

possiblylinux127@lemmy.zip · 2 pts · 2y

Acceleration would be 0.50 m/s^2

marcos@lemmy.world · 3 pts · 2y (1 reply)

*~

But you should really have a backup system. And often you should have a version control system too.

darkpanda@lemmy.ca · 4 pts · 2y

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.

Phoenix3875@lemmy.world · 2 pts · 2y (1 reply)

Use NixOS

PoolloverNathan@programming.dev · 1 pts · 2y

People here really hate our distro for some reason. Isn't it just Arch with extra steps (and all the configs in one file)? Everyone likes Arch! The definition of Arch is extra steps!

vynlwombat@lemmy.world · 1 pts · 2y

Did this with PAM the other day and nearly locked myself out.