I thought a fun thing to do would be to switch my main VPS to #alpinelinux for more frequent updates (compared to ubuntu). (I run #nextcloud, a custom #laravel site, and some other simpler stuff) So far, I've started using #linode, and also have been learning that migrating from mysql/mariadb to #postgresql may have been too ambitious an idea.
Actually, updating #nextcloud to #postgresql on #alpine was pretty easy
1. php occ db:convert-type pgsql nextcloud localhost nextcloud
2. (Disable some apps until that command worked)
3. ssh $OLD_SERVER pg_dump nextcloud | psql nextcloud
4. rsync data dir onto new server
5. Mess around with some config stuff
6. Update https://wiki.alpinelinux.org/wiki/Nextcloud wiki page to be slightly more up-to-date
#linode is now sending me #spam marketing emails with no List-Unsubscribe header😡 The email appears to contain a #googleAnalytics pixel🤦♀️ It's from a no-reply address🤷♀️ (otherwise I might be complaining directly to them)
The unsubscribe link (and reply email address) is hidden in the html portion of the email.
Upgraded my #alpinelinux server to 3.15, with a new release of #nextcloud and #postgresql...
Had issues with the postgresql upgrade, but (thankfully?) alpine still supports the older version, so I can cross the #pg_upgrade bridge at some later point.
Migrating a #laravel site to #postgresql from mysql/mariadb
1. Run migrations to create db structure
2. Remove single quotes from the database (and newlines/control characters, because why not). This allows mysqldump files to be imported into postgresql.
3. mysqldump --compatible=postgres --no-create-info --skip-add-locks $DB | psql $DB
4. Fix increments `ALTER sequence song_id_seq RESTART 12345;` (current versions of laravel use old-fashioned postgres increments)