rsync files to a Ugreen NAS

Ensure ‘Enable backup rsync service’ is enabled in your Ugreen Control Panel, and select an existing user that will be used when transferring with rsync:

To rsync a local folder to your Ugreen NAS, use:

rsync -avz ./local-folder/  user-enabled-for-rsync@your-ugreen-ip:NAME_OF_SHARE

Note that instead of using the path of a folder on a volume, e.g. /volume1/folder, if folder is the name of the share, use this as the target path without any absolete path prefix.

This is hinted at in this post, and while it seems to differ from how you’d normally specify a remote destination, this is how rsync on a Ugreen appears to work.

Proxmox inplace upgrade – v8 to v9

I have Proxmox 8 installed on my Mac Pro 2008 which I’ve run for a few years. Noticing that there was recently an update to 9, I followed the inplace upgrade instructions here, followed all the prompts during install as per the guide and everything went well.

Before:

After upgrade and reboot:

The only question I ran into was this prompt about updating an UEFI boot loader:

Removable bootloader found at '/boot/efi/EFI/BOOT/BOOTX64.efi', but GRUB packages not set up to update it!
Run the following command:

echo 'grub-efi-amd64 grub2/force_efi_extra_removable boolean true' | debconf-set-selections -v -u

Since I’ve tried installing OCLP on this Mac Pro before, I assumed this was something to do with that … so ignored it, rebooted…. and everything was ok …

Env vars with Python and Django: environ vs django-environ

One of the struggles when learning new languages and tech stacks is knowing if you’re doing ‘the right thing’ because you don’t know enough yet to know any better. I’m working on a personal Django project and need to externalize some properties, so I need to read some environment variables.

I was following this article but instead of adding a dependency for ‘django-environ’ I somehow miscopied and pasted ‘environ’, which initially didn’t give any errors until I tried to run my app, and ran into this unintelligible error:

raise ValueError, "No frame marked with %s." % fname
SyntaxError: invalid syntax

I’m not too sure at this point what this means, but a quick Google found this article which luckily points out that ‘environ’ is for Python 2 and I shouldn’t be using that.

‘django-python’ apparently also needs a later python version than I’m using, so changing to python-environ and I’m up and running.

Serial connection to a Raspberry Pi: more useful info

From my previous post I noticed that I couldn’t re-connect to the Pi using screen after I’d disconnected using Ctrl-A Ctrl-D. Reading additional suggestions here, Ctrl-D is just a disconnect, it doesn’t end the process that’s attached.

Instead, use Ctrl-A Ctrl-\ and it will ask if you want to terminate processes using screen.

If you do detach, from here you can use this command to list processes attached to the serial port:

fuser /dev/tty.usbserial-11240

This will show a pid that you can kill, and then you can reattach again.