Cup & Crêpe

<1 min read

Trying out a new crêpes place.

Toots du Jour (Mar 1)

<1 min read

Ghostbusters: Frozen Empire

1 min read

Every ghost they’ve ever caught is about to be unleashed.

Ultraman: Rising

1 min read

With Tokyo under siege from rising monster attacks, baseball star Ken Sato reluctantly returns home to take on the mantle of Ultraman. But the titanic superhero meets his match when he is forced to adopt a 35-foot-tall, fire-breathing baby kaiju. Sato must rise above his ego to balance work and parenthood while protecting the baby from forces bent on exploiting her for their own dark plans. In partnership with Netflix, Tsuburaya Productions, and Industrial Light & Magic,

Migrate Gitea/Forgejo from MariaDB/MySQL to PostgreSQL

<1 min read

I spent most of last night trying to figure out how to migrate my Forgejo (Gitea) database from MariaDB (MySQL) to PostgreSQL. There's a lot of misleading information out there, so I figured I'd post about it and hopefully prevent someone for falling into a rabbit hole like I did.

First, a bit about my setup. I'm using MariaDB and Forgejo, but these steps will work with MySQL and Gitea too. My database name is forgejodb (which will most likely be giteadb when using Gitea).

To migrate, the steps are:

  • Dump the current Forgejo database using:
forgejo dump --database postgres --config /etc/forgejo/app.ini
  • Unzip the dump archive:
mkdir tmp
cd tmp
unzip ../forgejo-dump-XXXXXXXXXX.zip
  • Create the user and database in PostgreSQL;
sudo -u postgres psql
postgres=# CREATE USER forgejo WITH PASSWORD 'changeme';
postgres=# CREATE DATABASE forgejo WITH OWNER forgejo TEMPLATE template0 ENCODING UTF8 LC_COLLATE 'en_US.UTF-8' LC_CTYPE 'en_US.UTF-8';
  • Import the dump data into PostgreSQL:
psql --username forgejo -h localhost --set ON_ERROR_STOP=on forgejodb < forgejo-db.sql

Don't forget to edit your app.ini with:

DB_TYPE = postgres
HOST = 127.0.0.1:5432

It's pretty straightforward if you have the right steps.