0

I use my Pi for a couple things:

  • SSH
  • VNC
  • SMB + mini dlna
  • Game streaming

I have also installed some stuff on it like pihole. I might wanna start using it for hass.io as well at some point; perhaps messing around with Docker/k8s.

I am now at the point that if my Pi were to crash or die, I would be completely hopeless if it came to buying a new SD card and setting it all up again.

I was wondering about some good ways to prevent this loss of knowledge and to make it clear to myself what changes I have made over the years.

Things that came to my mind are back-ups, but I would still have the problem of not knowing what files I changed 2 years ago to make SMB work, for example. I could use git but I feel like I would have to initialize a repo in / and that feels wrong.

1
  • Given Pi's usually run off comparatively cheap SD's the easiest way would be to buy a second sd and clone the SD in the pi and then in the event the original fails just swap the SD card out and carry on. That said if you want to look into more granular backups I'd suggest looking into rsync as a starting point. It's really powerful and let's you back up changes to the system much faster than copying the whole SD every time.
    – rohtua
    Commented Jul 9, 2021 at 16:57

2 Answers 2

2

I would be completely hopeless if it came to buying a new SD card and setting it all up again....I was wondering about some good ways to prevent this loss of knowledge

Keeping a whole system backup doesn't really address this last problem (that you don't really understand/remember what you've done). IMO there is something that is inescapable with serious technical work, you will waste a lot of time and screw more things up if you do not learn to:

KEEP NOTES

And take it seriously. I like using dropbox for this as it is accessible one way or another locally on all the systems I work on (mostly by sshfs mounting a directory from a server running the dropbox daemon), but I'm not here to sell dropbox, merely the point that you have to make it easy and do it universally. Don't use paper, or if you do, copy them out later.

The better my notes are, the more I use them, and the more I use them, the more I am motivated to keep them and make them better.

Use directories to categorize, you can search plain text quickly and easily, the more you do it the more refined your technique will become; I actually use markdown (same format used in the editor here) and that server with the dropbox daemon also runs an HTTP server which formats them live.

The point about that is to make them useful and use them; the other system I use are shell macros to do text searches places where the notes are locally available.

notes rpi SEARCH vcgencmd

Searches the top level "rpi" directory for notes containing vcgencmd. Similarly, notes rpi vcgencmd EDIT brings up an editor contain [notes top level]/rpi/vcgencmd.md, creating it if necessary.

I've been doing this for years and I use them constantly -- as much as I consult man pages or Stack Overflow questions. I find notes on stuff I didn't think I'd done before, lol, and I know the kind of things I get perplexed by and how to explain them to myself.

0

I strongly endorse the advice given by Goldilocks.

I have a regular backup procedure that I run for each combination of hardware/OS.

I used to keep a notebook, where I made notes of software I installed, files I configured etc. I have done this for years, first on Windows, then macOS and now on my Pi.

Now I have so many Pi, used many OS and upgraded over the years, so the paper copy became unmanageable. I now have a list of files, which I update with notes and hints as I apply them (this has become invaluable as my memory is now poor). (I use a BBEdit project to keep these files handy.)

I have posted a number of hints I use when preparing a new OS.

A couple that may be useful:-

apthist

Bluetooth copy

Move to new OS

NOTE the last might look like a script, but it actually an aide memoir and many of the steps are only applicable to my system. Some of the steps are now obsolete.

I most recently used this in configuring a Bullseye installation for testing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.