Episode: 3657 Title: HPR3657: Small time sysadmin Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr3657/hpr3657.mp3 Transcribed: 2025-10-25 02:57:27 --- This is Hacker Public Radio Episode 3657 for Tuesday 9 August 2022. Today's show is entitled Small Time Size Admin. It is hosted by some guy on the internet and is about 26 minutes long. It carries a clean flag. The summary is How I Maintain My Linux Box, Part 1. Hello and welcome to another episode of Hacker Public Radio. I'm your host, some guy on the internet. Today's show is a bit of system maintenance and system administration. To give you a bit of background, I started using Linux back in 2019. The end of 2019, I use mostly Ubuntu-based distributions and I am familiar with Fedora-based distributions as well, or I guess you would say the DNF package manager style distributions. I'm a team red guy, not because of the open source nature of it. I later found out about that and became a bigger fan of team red because of it, but in the beginning it was because it was cheaper and I could actually afford it. Let me take a quick second to apologize for the sound of the HVAC in the background. Right now the HVAC is not on, but it is going to come on numerous times throughout the recording. It will create a hum in the background. It is the air conditioning. It's over 100 degrees right now where I am and I apologize for the hum, but in the words of Ken Fallon, record, send. What was it? Perfection is the enemy of HBR. Yeah, so if I ever plan to get anything out, I must do it with the current situation I have. I'm currently speaking to you from my desktop. That's where I do most of my work on. I do boot with Linux and Windows. I'm currently using pop-o-s for Linux and Windows 10 for Windows. My favorite distro however is Linux Mint Cinnamon Edition. I really enjoy the Cinnamon Desktop and the Linux Mint version of the Cinnamon Desktop is, I believe, the best implementation of the Cinnamon Desktop. I have tried the Fedora and I believe it was the Manjaro Edition of Cinnamon, but Linux Mint Cinnamon seems to be the absolute best and I believe that because it allows me to get to work without any frustration. But it's nothing super special about it. I can just start working immediately. No issues. Personally, I don't believe in beginner friendly distro versus pro level or elite distro or whatever their buzz terms you can find out there. I believe it's all a bunch of horse excrement, whatever you do and whatever you can use, whatever you have is the absolute best thing out there, all right? Whatever you can actually get on your system right now to begin working is the pro elite whatever buzz word you can find. Whatever you cannot use and whatever takes you more time to adapt to is the worst thing, all right? Now, later on if you can adapt to it and make it your own, then okay, it becomes the best thing. But until then, whatever you have right here right now is the absolute best. This reminds me of a saying from Steve Irwin, the crocodile hunter. I remember listening to one of his shows back in the day when he was talking about customer sending in questions and things, asking questions like, what's the most deadly snake in the world Steve? And he answered it perfectly. He said, you know, never mind what snake has what type of venom, you know, that causes what sort of issues in the human body that'll kill you eventually. Never mind all of that. The snake that's attached to your leg right now is the most deadly snake in the world. Never mind the one in Africa, never mind one in Southeast Asia or wherever and the type of venom that they have. The one on your leg right here right now, that is the most deadly snake in the world. So I took that bit of information that Steve gave us and I applied it in different ways. So same thing with technology, you know, that computer you got right there. I don't care what you got it from the trash and auction, whatever. That one that you got getting your work done, that's the best. That's the top notch best server grade enterprise. You know, think of the buzzwords. You got it. That's it right there. Alright, so now that you know a little bit about me, let me talk about my system a little bit. Okay. So you know I'm using windows. I use windows for gaming. Alright, windows is the best gaming operating system I have ever used and the coolest thing about it, you know, unlike Xbox or PlayStation or anything else I've ever used for gaming. Windows is superior just because I can actually open a Firefox browser in it and get this listen, you might not believe me, but in this gaming operating system called Windows 10 that I use, I can actually open Libre office. I mean, that is crazy. I have never heard of it. Can you pick up any PlayStation or Xbox right now in the store, load Firefox or Libre office or whatever on it? You can't. But right now with Windows 10, that gaming operating system, I can load Firefox, watch YouTube, anything. I can even load it Amazon or, you know, anything in that Firefox instance, it's the full web. And if I needed to, I could possibly even load up Thunderbird in there. But I don't because I don't need to. I have Linux. Now, under Linux, that's where I do video editing, photo editing, audio editing for, you know, podcasts like what I'm doing right now, um, a little bit of, you know, learning to code. I'm learning Rust Python, um, I tinkered around a little bit with HTML and CSS for some side things, a little bit of Lua, because my keep, my, one of my gaming keyboards has a lure, uh, what do you call that thing, uh, interpreter or whatever in there and then in order to create the macros for it, it's a, it's a logitech keyboard, the logitech G510, I think it is. But either way, I learned a little bit of Lua just so I can do that. Just, you know, I tinker a lot with a lot of little things to scratch my itches. So there's a ton of just little things that I, I have at my disposal and it's all managed under Linux. Now in the beginning, I used to use just a regular notepad, then I switched over to VS code, then I switched over to them. It was wonderful. Each of these are great tools, especially them. Once I became more proficient in them, oh my god, I just, I fell in love with it. But the only problem I had with them, my notes were scattered all over the place. I didn't have an actual one place that I dedicated both in my mind and on my hard drive for where I would save my notes. I basically just saved them wherever I was. So say, for instance, if I was editing yet CF's tab, I just used Sudo with them and just saved a little note right down in there because I figured, you know, hey, next time I need to add this thing, like if I buy a new drive and I dump it in there and I need to mount that drive and, you know, want to want to be able to save some notes about the UIDs of this drive, et cetera, et cetera, hey, be good if I just had it in the place where I'm going to be doing all the edits, right? So part of the problem is when it comes down to back up all of those notes, back up is one of the things we're going to get to, I'm interested in here, but right now when I need to back up all of these notes that I have, they're all over the place. I need a centralized place to do my notes. So I eventually moved toward job, one job, one is great, but in the beginning, I didn't even know where job done was saving the notes. So I had a problem. I went into the, was it the tool section, whatever, and found out that, okay, you have to save them to your hard drive or you can save them to a server somewhere. Now the server section is key here because I have next cloud servers, one of them that I use as the actual like production and air quotes here on a Raspberry Pi 4 8 gig and argon one case attached to a 500 gig Western Digital Blue M.2 SSD. I have next cloud mounted for me and the family to use and attach to that next cloud instance. I have my job length instance and my job length instance, I have two profiles. I have a job length folder saved under the, what is it? You know how in next cloud, you can select files. So I then created a notes and then sub directory of notes is job, and then there's two sub directories of job, and which is the LAN, Lima, Alpha, NATO, and then there's the WAN, Whiskey Alpha, NATO. The LAN is my personal stuff that I do for me and work and the WAN is all of the show notes type stuff that I do for HPR or anything that I'm willing to share online or mostly because there are some stuff in there like my network config that's also in there that I haven't cleaned up entirely yet. So that needs to be cleaned up. So I say about 90% of the stuff that's in WAN is, you know, ready to be shared online. But LAN profile, note, that's all personal and I have the both of them are synced and being backed up, I have bash scripts designed to automatically create sub directories so that I can own on my local system. I create the sub directories under my documents folder for a job plan that automatically, you know, it's a function in my bash RCE, well, not in the bash RCE, it's in the bash alias, which is called by the bash RCE and it creates sub directories for job plan. So that way I can do an export in the Joplin JX format as well as the Joplin markdown so that way I get the JX as well as all the individual markdown folders for both the LAN profile and the WAN profile. So I come back everything up and that way if anything goes wrong, I need to wipe the server or the server dies like the pie just completely bricks and I need to just, you know, get a new one, set everything up, which will probably be a Vm later on, I'll talk about that another time, but yeah, whatever the case is, I got backups for days. All right, so now that we got that boring stuff out the way the notes, right, and everybody takes notes that's not important unless you want to know what's in the notes, that's the important stuff was actually in there, but we're not going to talk about there right now. Let's talk about the backups. I know the about what do you call it, R sync, there's vacula, there's all these different ways of doing backups. I wanted the most basic, I mean, like almost primitive backup system and I wanted something that I can manage myself. So even if a project maintainer decides, I know I want to be bothered with this, you know, you guys friend for yourself, I wanted something that I know how to use and because I don't fully, you know, understand programming languages right now, everything I am dealing with is mostly at a slow pace, what I can do with the two-year-old and the wife at my side. I have to use something that's a little, you know, slower. So I use tar and I use tar with scripts, I create a script that will jump around to different directories, find the files that I want and just tarball them and then, so let me just backup this a little bit, right? So first in my home directory, I have a dot archive directory. That archive directory is where all the tarballs are ultimately going to live. That directory is actually a mounted drive. It's a six terabyte Western digital blue, you know, they always tell you, hey, don't buy these drives because they're SMR instead of CMR blah, blah, blah, blah, blah, I don't care. It's six terabytes. It's a good price and it works and I have numerous of these drives and I've had them for years, they work. So, anyway, there's a script on the drive. The script is ran. It's a dot archive directory there. I run the script, the script prompts me, it's like, hey, what do you want to back up? So then I tell the script, I want to back up, Thunderbird, my email, configs, right? So then the script uses tar to jump into the Thunderbird directory or the dot Thunderbird directory. So down into there, find all of the message filter files for the different email accounts that I have logged into Thunderbird, back all of those up individually with names. So each of the tarballs created from those message filters, which are basically your rules, your filters for all of your email accounts, back them up with the names that I have specified in the script. So that way, when I want to restore those, like say, for instance, if I buy a new laptop or my laptop that I actually use now, say, for instance, I'm done with Fedora 36 and I want to use Archer, whatever on it. And I want to load my emails back on it there. Well, guess what? I can just load my filters right back on it. They're super easy because they're just tarballs, you know what I mean? I can just, you know, use tar and command line to unpack those directly into the folder where there need to be no problem whatsoever. Also, man, I need to get some water. All of my emails are also pulled down. And let me go ahead and give a shout out to Lurking Pryon because this is something I did not even think about. I always pull my emails offline and I saved them locally and I archived them in Thunderbird locally so they're no longer on the service. But the thing I did not think about was the send folder, Lurking Pryon and one of his, not admin admin anymore, I forgot they talked about why they couldn't call it admin. I think somebody else was using that. So what evil Steve doesn't want you to know, shout out to Lurking Pryon. Great, great stuff. He was also, I'm going to be using his tip about putting your phone number on the lock screen of the phone, but I'm learning the dimensions of my phone so that it looks properly when you're looking at it because I tested it in Inkscape trying to create that. But that's another thing, shout out to Lurking Pryon and his, what evil Steve doesn't want you to know episodes, fantastic stuff, great information. But either way, I pulled down everything out of my sent folders as well because I totally forgot about the sent folder, backed everything up and I do this just about every month. I just go on there, back everything up locally. So it's offline, but I have it on all of my discs. My discs are encrypted. So when they're powered down, you can't get the data off. And I want to power on and I used to keep the unlock them that's different, but outside of that, even the external discs that I plug in with eSATA to do backups that are not inside of the desktop, you know what I mean, either way, they're still just tarballs, either way. And I have all of my emails backed up in a big old tarball that I can extract like so if I get a new destroy my laptop and I want to restore all the emails, including the archives onto my laptop. Once I log in to Thunderbird on the laptop, I can then take that Thunderbird, a tarball of those backed up emails in the archive, you know, just using tar, what's it called? There's it's a tar extract, all right, but you but use tar extract and then you use the jump command, which is the capital C is like the hything capital C after extract to jump to the directory that you want tar to extract a file to and then from there, you specify the file, which is the tarball, which is always going to be in the dark archive folder, right? Even on my laptop, I create a dot archive folder. And how I do that is I have a script called pave, all right, you know, short for nuke and pave. So I run pave on any brand new installation. So pave will do is set up my my directory hierarchy or directory structure. So inside of my downloads folder, I have an end, I have a out, I have a delete and I'll have a playground inside of the downloads folder, which is normally inside of your home directory. The end folder is what Firefox is attached to. So all new things downloaded to the system automatically go on the end folder, the out folder, anything I'm going to be emailing out to, you know, I'm in the union and all of the union members and things that I deal with, whatever has to be emailed outside of my system goals into the out folder, I've had problems in the past where I accidentally selected things that didn't need to go out because they were in the, you know, the documents folder, good thing they weren't anything super personal, but still when you accidentally email something that's not necessarily supposed to go out, it's embarrassing. So I created an out folder in the dot, in the slash downloads directory that will hold the items that I need to send out and then once I've sent them out and they, you know, I no longer need to send things out, I wipe the folder. So it's clean for the next batch of things that need to go out. And then the playground, obviously playground, you know, anytime I'm testing something like when I'm building a new script or I'm testing a new section of the script that I'm talking about right now, do it all in the playground. And then the delete is whenever I'm creating a new tarpaul that I just want to test and I just dump it into the lead because I just got a script to set up the automatically wiped the delete folder or not a script is, it's actually a function in my, my bash alias now. So I just run that real quick and it wipes the delete folder. All right. So a quick recap, tar reaches out, grabs the tarballs and load them all into the dot archive directory, which is actually just a, you know, under the drive, but I have it set up to look like a directory or whatever. And it, you know, it's mounted there. And then whenever I want to back things up to my external drives, I just use a CP with the updates in a script that will automatically copy all the new tarballs over to the external drive that I connect via eSATA to my desktop. So that way, now all my external drives for my external backups can get all the new tarballs, including the one that I use sort of like sneaker net to plug into my laptop to take all then the latest backups, if you will, and put them into my laptop. So I can get that up and running at a moment. So notice when I need to all these external drives are encrypted with lux. I set them up using the was a GNOME disk utility, which will give you the option to set it up as an internal drive using lux encryption. And that's what I use for that to secure those drives. So even though they're in house and I don't take them outside, I still have them encrypted because well, not all of them go outside. I'm going to talk to you about that another time because I'm testing something out for a for sort of an offsite backup that is technically offsite, but not technically offsite at the same time. So all the notes converted over to job line with job and then gets backed up in a tarball. All the tarballs go over to external drives as well as an open media vault server, which is on the network. And you know, that's just handled through SMV. I haven't learned to set up NFS yet, or I tested it, but something went crazy out. I don't even want to talk about it. It was a little disappointing what happened with that. I'll figure it out later, but hence, pop away, since that of Linux Mint right now, there's also just, you know, external drives go low. Now, this is the vast majority of the system maintenance, making sure that I have tons and tons of backups, these tarballs, because the things I care about the most are the data that I generate, my notes, my things for my job, all of that. So as long as I have regular tarballs, like created almost every single night of those things, I'm perfectly fine. And I do like a once a week, maybe even once every, you know, 10 days of all the other stuff, because they get changed a little less frequently. But the stuff that I do on a daily basis, like if I change even one thing in Joplin, there's a new backup created right after that. And it is synced across the other devices, because if anything happens, I want to be able to restore fresh. I have a rule that I often break, which is no pseudo after 1am. And it's for a good reason. I have, you know, wrecked numerous installs by breaking this rule. And I mean, you're just too tired after a certain point, right? Mentally, you want to be able to continue, but your brain is just not as sharp and you make a ton of mistakes, which ultimately, you know, put your backups to the test. Because I've wrecked numerous installs and backed up just, I mean, almost instantly, and my scripts have improved after every single mistake. I use these mistakes as a learning opportunity as well to not only test my current situation, but to build on it, to improve it, to make my ability to restore faster every single time to where, you know, if I wreck my system right now, I could do a nuke or or or pave excuse me, I could I can nuke the system with a fresh install, do the pave script, which will rebuild my directory structure. And then I have two scripts in my external drives. One is called get over here, which reaches out and grab all the tarballs from the places that I want to not not grab the tarballs, but grab the files and make them into tarballs so that they can be backed up onto other devices. The other one is called get out of here, which then takes those tarballs on the new install and throw them into the directory structures that was set up by pave. It's not very high tech, it's not very sophisticated, but the way I see it, tar is on every single Linux system. So no matter which system I choose, I always have my backups and I can always gain access to my files with with very little hassle. So that's why I choose the method that I have now versus a tool that could possibly no longer be maintained or could be subject to some sort of what do you call it, not ransomware, protestware, you know, or some, you know, some other thing. My files are very important to me and I need to be able to manage them as closely as possible. I do that mostly with the command line by using my bash or not bash RC. I mean, technically it is the bash RC, but it's the bash alias, which is attached to the bash RC. The bash alias is more portable, so no matter which bash RC I run into, rather it's on a DNF base system or an apt base system or a, you know, what is it, yay, um, Pac-Man, uh, whatever. I can always attach the alias to whatever that new system is as long as it's got bash and call my functions over there to begin just basically working my backups and, you know, operating as business as usual. And the command line is the universal interface. It is, it is the electron before electron. It runs everywhere. So if any of you guys out there using an orthodox system for backups, anything, I mean, go ahead and share in the comment section, do a show with and definitely share your opinions, man. Let me know what you think about the show that I've done. Let me know if the audio quality is a problem for you. I'm, I'm very passionate about the audio quality because I have poor hearing. So as you can hear the HVAC just cut on just now. I have poor hearing. So I use a set of Bose QC 35s to do my audio editing. And when you use these, they have noise cancellation. So they separate all of the outside noise and amplify the internal sounds that you're listening to. So when I'm editing, I can hear all of the imperfections in the audio and it drives me bonkers. After a while, I can't even hear the actual content all I can hear is just the imperfections. So it drives me nuts. And I don't know if you guys are having the same issue. So I'm just asking, you know, just give me some opinions, something out there. But I'm going to go ahead and call it a day now. Thank you guys for listening. Shout out to Lurking Pryon. Shout out to Ahuka. Oh my God. Thank you, Ahuka as well. Did an episode in the past about creating, what is it? Audacity macros. You know, I finally decided to build it a part of my backup script to backup my Audacity macros. So I don't have to keep recreating them every time I accidentally blast my system in the pieces in the middle of the night and cry up until like 3 a.m. as I restore everything. But yeah. So shout out to Ahuka. Shout out to Lurking Pryon. Shout out to Ken Fallon for the words of wisdom in the middle of the night on an element. Thank you guys for listening. And I'm out here.