I had previously set up a bash script to backup a mysql database. It created daily dumps, gzipped them, and retained 7 daily, 4 weekly and 3 monthly backups via a system of symlinking. That all worked fine for a few years, but I revisited it more recently as we now wanted to keep an offsite copy of the backups, and that would require encrypting them. The problem is gzip doesn't do encryption, so we needed to explore a few options, so I went through gpg, zip with password, etc, and then came to restic.
Linux
Bash alias trick: show multiple timezones
Just a dumb trick I whipped up and was inordinately proud of. Sure I could go along to timeanddate dot com but I spend a lot of my time in my terminal and this is immediate. Small effort big payback. OK, so the code is just this, added to .bashrc The first block is the … Read more
Increasing Linux swapfile with minimal disruption: the swapfile shuffle
Had a server which needed a bit more swap, but the current swap was at 100%, and it was marginal whether there was enough RAM to allow me to delete the current 2G swap and replace it with 4G. So I came up with the "swapfile shuffle". All good. Happy server.
Removing all 5.xx kernels and associated modules, config from Ubuntu
I was getting a bit cramped for space on the root partition of an older desktop, which has been running for 4 years or so, and discovered that although I'd been running the 6.x kernel for several years, there was a lot of baggage from 5.x kernels lying around. Here's a reminder to myself how … Read more
Mail troubleshooting with curl.
A docker container wasn't sending mail. I'd debugged the connection from the host machine and that was working, but once inside the container, there were no tools available. No mail, no mutt, no traceroute, no ping, no mtr, no netcat … so how to find out if the container could send to the mail server … Read more