____ _ _ _ ____ ___ ____ __ / ___| _ _ _ __ / / | | | __ _ _ __ |___ \ / _ \___ \ / /_ \___ \| | | | '_ \ | | | _ | |/ _` | '_ \ __) | | | |__) | '_ \ ___) | |_| | | | |_ | | | | |_| | (_| | | | | / __/| |_| / __/| (_) | |____/ \__,_|_| |_( ) |_|_| \___/ \__,_|_| |_| |_____|\___/_____|\___/ |/

.------ .--' o .-' . O .-'@ @@@@@@@ /@@@ @@@@@@@@@@@ ./ o @@@@@@@@@@@ /@@ o @@@@@@@@@@@. /@@@@ . @@@@@@@o |@@@@@ . /@@@@@ O `.-./ . Last Quarter + | @@@@ --`-' o 0 7:10:45 |@ @@@ ` o New Moon - | @@ @ . 7 20:53:17 \ . @ @@@ ` | @@ @@@@@ . \ @@@@ @\@@ / \ o @@ \ \ / `\ . .\.-.___ \ `-' `-. o / | `-. / . `--. `------

                Mist
   _ - _ - _ -  +39(37) °F
    _ - _ - _   ↘ 3 mph
   _ - _ - _ -  3 mi
                0.0 in

00:35:53

I found https://juicefs.com which mounts an s3 compatible storage locally and encrypts the data in transit and at rest.

I also found https://bunny.net/ to use as storage.

05:01:46

I ended up using backblaze as the backend to juicefs (bunny.net only has sftp). The setup of juicefs is a little involved but their docs are good enough that I figured it out. I set up encryption and postgres so I can connect to the volume from any computer on my tailscale network. The nice thing about backblaze is that 1TB is $6 so even if I wanted to upload Jacob’s entire collection it wouldn’t even be $3 a month to store. As it is now, it will be a few cents a month.

To mount the juicefs volume you need the RSA encryption key stored in the environment variable $JFS_RSA_PASSPHRASE you also need to to tell it where the database is and how to connect with a postgres url. I have it automount on artix with systemd because I can pass it the keys it needs automatically.

I couldn’t get it to automount on atreyu because the juicefs binary is not able to be linked to the appropriate place in /sbin/mount.juicefs because that part of the filesystem is readonly.

I had to restore a database from backup because postgres changed a default and the container wasn’t storing the databases to the volume. Luckily I made a backup with databasus.

I restored the backup with the wrong user, luckily I found this insane looking loop that I used to change the owner of each table back to the right user. I need to actually learn how to manage a postgres database and not just wing it like a cowboy.

-- Begin an anonymous PL/pgSQL code block
DO
$$
-- Declare a record variable to hold table names
DECLARE
    tbl RECORD;
-- Begin the procedural block
BEGIN
    -- Loop through each table in the specified schema (e.g., 'public')
    FOR tbl IN
        -- Select all tables from the schema 'public'
        SELECT tablename
        FROM pg_catalog.pg_tables
        WHERE schemaname = 'public'  -- Change 'public' to target a different schema if needed
    LOOP
        -- Execute the ALTER TABLE command to change the owner
        EXECUTE 'ALTER TABLE public.' || quote_ident(tbl.tablename) || ' OWNER TO new_owner';
        -- Note: Replace 'public' with your schema and 'new_owner' with the new owner's username
    END LOOP;
-- End the procedural block
END;
$$;

05:19:12

Trying out https://github.com/swingmx/swingmusic to play music from artix. It’s not bad. I would love to have an mpd frontend that streams the music to itself using mpd’s http output.

05:21:56

ansii escape codes

06:19:43

Found a replacement for Sonarr, Radarr, Overseer and Jellyseer. I might give it a try. https://wiki.serversatho.me/en/mediamanager

It’s actually freezing right now.

                Freezing fog
   _ - _ - _ -  30(26) °F
    _ - _ - _   ← 3 mph
   _ - _ - _ -  0 mi
                0.0 in

08:49:56

Trying to sleep but have a bloody nose from a nasty person using perfume in the house.

16:26:07

To update nfs exports use sudo exportfs -ra