Computers & Tech posts

Openrsync issues resolved (I hope)

I think I have finally worked through and fixed the issues caused by Mac OS 15.4 switching from rsync to openrsync. With the switch, many of my backup and other rsync scripts broke, throwing errors and not finishing the sync. As of that last post, I had gotten things mostly working, but had to disable incremental snapshotting and still sometimes had failures that I had to deal with.

Some of the errors I’ve had include:

… copy_file dfd: openat: Too many open files …
… empty link …
… error: unexpected end of file …
… No such file or directory …
… opendir … failed: Interrupted system call …

For Too many open files, I had to reduce the file count in my really gigantic backups. Instead of backup up the entire /Users directory, I made a loop to do each user separately. I also excluded various cache directories and the like that have lots of files that aren’t important for a backup. It took searching and repeated runs to find and add enough such folders to the list. These include:

rsync … \
--exclude '.brew' \
--exclude '.cache' \
--exclude '.node-gyp' \
--exclude '.npm' \
--exclude '.pnpm-store' \
--exclude '.sass-cache' \
--exclude 'node_modules' \
--exclude 'Data/Library/Caches/' \
--exclude '/Library/Application Support/Adobe/Fireworks CS6' \
--exclude '/Library/Application Support/Amazon Music' \
--exclude '/Library/Application Support/Firefox/Profiles/*/storage' \
--exclude '/Library/Application Support/Chromium/*/Service Worker/CacheStorage' \
--exclude '/Library/Metadata/CoreSpotlight' \
--exclude '/Library/Caches' \
--exclude '/Library/Cookies' \
--exclude '/Library/Logs' \
…

For unexpected end of file, I had to add the --inplace option. I think this has some risks to it. The man page mentions possible issues with hard links: Not sure if that relates to the --link-dest option and if it may cause overwrites of previous snapshots or anything like that. But I needed it for the incremental snapshots to work at all.

For Interrupted system call, there were certain folders, mostly in user library folders, that I found I needed to exclude. The error message unfortunately gave no hint to where the error happened in the filesystem, so I had to do a time consuming process to find the problem files. I excluded large folders until things worked and then added back items within those until I had added back what wasn’t causing the error, up to the amount of time I was willing to spend going deeper or when I was dealing with folders whose content didn’t matter for backup. I don’t remember all of them, but I believe they included:

rsync … \
--exclude '/Applications' \
--exclude '/Library/Application Support/iTerm2' \
--exclude '/Library/Containers/com.apple.Safari/Data/Library/Caches' \
--exclude '/Previously Relocated Items*' \
…

As mentioned in the previous post, for empty link, I had to remove or exclude symlinks that weren’t pointing anywhere. Some of those were for stuff that does point to something when shared with a virtual machine, which had to be excluded. Others were simply links whose originals must’ve been removed at some point or whatever, and could be removed without issue.

For many use cases, using the homebrew version of rsync (brew install rsync) will be the normal version and not have these issues. But I don’t want to run homebrew stuff with my root user, and I need to use the root user to broadly back up all of my users’ data at once.

I’m not sure why Apple had to switch to openrsync, and I’m not sure why openrsync has so many troubles that regular rsync doesn’t. It took up a fair amount of my time and frustration to get things fully working again. But I’m glad I seem to have solved the issues.


Got a smartwatch: Bangle.js 2

I bought a Bangle.js 2 smartwatch from Adafruit. I haven’t ever owned or played with a smartwatch, and haven’t even worn a dumb watch in 15 years or more. But I got to thinking that I look at my phone a lot for time and notifications, and this could reduce phone use and simplify that behavior at the same time. An e-paper screen could make it less like looking at a mini phone on my wrist. It also could do some other things like step counting, sleep monitoring, and heart rate monitoring that might be useful, and timers, alarms, and stopwatch so I don’t need to reach for my phone for those either. The Bangle is open source, lightweight, and seems feature filled enough to fit what I’m going for, cheap enough ($89) to not worry too much if I want more later.

Continue reading post "Got a smartwatch: Bangle.js 2"

Looks like my Macbook Air (2020 Intel) will not be supported for the next major MacOS update, Tahoe. I knew that was coming at some point when they switched to ARM architecture. Luckily, Sequoia should still receive security updates into 2026 or 2027, and that’s all I really care about. By that point, I will probably transition to a Linux computer for my main, and if I need a new Mac for other stuff, may just get a refurb Mini.


My main email app (Fastmail) on my phone logged me out without me noticing for two days. I’ve been trying to not pay as constant attention to my email as it is, so it just seemed nice, but I didn’t even really think about it in that period. Happened to have more than the usual amount of emails when I got back in, though luckily, nothing important. It’d be nice if I could have it only notify me immediately for email from certain addresses or something like that.


ZSH regex capture groups

In writing a script for the ZSH shell, I wanted to extract some bits from a string. I looked for a regex solution, using capture groups. I could not figure out how to do it with sed but I found that the [[ ]] format of the test command allows this with the =~ operator. If the test returns true, values are stored in a $match array and can be accessed like $match[1] and so on.

Continue reading post "ZSH regex capture groups"

Finally got the One UI 7 / Android 15 update on my phone (Samsung S24) today. 15’s been out on Pixel devices for six months, but it took Samsung a long time with this one. I had bought this phone in part because Samsung is supposed to be quick with releases. Hopefully, this doesn’t become the norm.

Not a lot has changed noticeably. My most liked change is that I can have most app icons match my chosen accent color (green) which makes my home screen and quick app drawer look much nicer. There’s also a feature which separates the notification drawer and quick settings slide down, where swiping down from the left shows one and from the right, the other. I’m still getting used to that but may find it results in less swipes. There are a few other aesthetic tweaks. I think there’s a bunch of AI stuff, but I’m not that interested in that.


Using pipes to augment IO of command with bash script

I like the interactive mode of the bc command line calculator because it is ubiquitous, but wanted to augment its functionality a bit to add a couple features I liked from another calculator program. I wanted to make modifications to the text I typed before sent to bc and modify the text it outputted. This can be done on standard POSIX shells with mkfifo, but it took me a good while to figure out how to do this with both input and output and get something working nicely without it freezing or leaving artifacts. So I’m sharing how to do this in a bash script.

Continue reading post "Using pipes to augment IO of command with bash script"

Server upgraded from Ubuntu 20.04 to 22.04

My server was on Ubuntu 20.04, but due to the end-of-life of that LTS version next month, I have upgraded to 22.04. My server is managed with Vagrant / Ansible. My plan had been to do a new local VM on the newer version, get it working properly with Ansible, then set up a new server with it and migrate over. However, since Ubuntu isn’t releasing an official Vagrant box for 24.04 and beyond, I don’t think it makes sense to take that path. I may move over to Debian or look into Vagrant alternatives, but to get this done before EOL, I decided to just try a do-release-upgrade to upgrade the existing server in place.

Continue reading post "Server upgraded from Ubuntu 20.04 to 22.04"

In Mac OS Sonoma, browsers now require and the OS will ask for the “Local Network” permission to access local websites. I didn’t know why it was asking and didn’t allow it, but then couldn’t access my sites. I had to go to “System Settings”, the “Privacy & Security” pane, select “Local Network” and turn on for my browser(s) to get access again.

If it matters, my local dev setup uses domains set in /etc/hosts pointing to IPs of VMs run by VirtualBox, managed by Vagrant, set up like web.vm.network 'private_network', ip: '192.168.56.1'.