diff options
Diffstat (limited to 'served/words')
-rw-r--r-- | served/words/akkoma-postgres-migration.html | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/served/words/akkoma-postgres-migration.html b/served/words/akkoma-postgres-migration.html index e7c804b..ea2f671 100644 --- a/served/words/akkoma-postgres-migration.html +++ b/served/words/akkoma-postgres-migration.html @@ -3,8 +3,8 @@ template=post title=Akkoma Postgres Migration style=/styles/post.css style=writing.css -#Summary A retelling of how I migrated my Akkoma instance's Postgres database and the troubles I faced. -#Publish 2023-10-18 + +published=2023-10-18 23:16 --- \<i>(i'm going to say Pleroma a lot here where Akkoma might @@ -21,7 +21,7 @@ style=writing.css </p> </details> -<hr/> +<hr /> Recently I went about trying to get the services running on my VPS to be happy in a gig of RAM. I did not achieve this, @@ -47,7 +47,8 @@ to give me the right config lines for 100M. It worked well! This was all for naught, though, because I couldn't get my disk to fit under 25G, which was also a requirement of nanodeisation that I'd forgotten about. The database itself was 9.9G! You can -<a href="https://docs.akkoma.dev/stable/administration/CLI_tasks/database/#prune-old-remote-posts-from-the-database">Prune old remote posts</a> +<a href="https://docs.akkoma.dev/stable/administration/CLI_tasks/database/#prune-old-remote-posts-from-the-database">Prune + old remote posts</a> but I didn't really want to do that yet. It seems like the right way to go, but I had one more trick. @@ -60,7 +61,7 @@ certainly put this on the same server as all my things, but I like having the separation. This does mean that I pay for almost an entire Nanode to do -very nearly nothing. +very nearly nothing. By putting Postgres on it I'd lose the different-machine aspect of the separation, but gain so much disk space and memory. The @@ -69,7 +70,8 @@ good enough for me! <h3 id="setup-postgres">Postgres Migration</h3> -<i>(more of a recount of events than a guide, but written guidlike? just pay mind to the commands and you'll be fine)</i> +<i>(more of a recount of events than a guide, but written guidlike? just pay mind to the commands and you'll be + fine)</i> Install Postgres on the new server. It doesn't have to be the same major version since we're going to dump and restore the @@ -84,7 +86,8 @@ these have to match the database you're migrating from. I followed the <a href="https://docs.akkoma.dev/stable/administration/backup/#restoremove">Akkoma database restore/move</a> docs and ended up using psql, again under the postgres user, to run <code>CREATE USER akkoma WITH ENCRYPTED PASSWORD '<database-password>';</code> and -<code>CREATE DATABASE akkoma OWNER akkoma;</code>. <i>(well, i replaced akkoma with pleroma and later used alter queries to change them, but that's because my database is old)</i> +<code>CREATE DATABASE akkoma OWNER akkoma;</code>. <i>(well, i replaced akkoma with pleroma and later used alter queries + to change them, but that's because my database is old)</i> After that was ready, I used my firewall of choice (ufw) to allow the servers to talk using their private IPs <i>(yay same datacenter)</i>. After that was done, I ran @@ -92,7 +95,7 @@ this command <code>pg_dump -U akkoma -C akkoma | ssh dynamo "sudo psql -U akkoma and waited. <i>dynamo</i> being the host of the new postgres server and owner of a spot in my .ssh/config. -A Note:<br/> +A Note:<br /> you can directly do <code>pg_dump ... | psql ...</code> but the Postgres upgrade docs say you need to use the new psql version to upgrade, and the old server was missing that binary. Instead of seeing if psql 13 would work or if I could get psql 15 working there, I @@ -138,10 +141,13 @@ does someone like me do when out of luck? Past the error into Google of course! Maybe I should've done that from the start, right, but I don't get many results for Akkoma or Pleroma normally. -So to google I went! And pasted <q>timed out because it queued and checked out the connection for longer than 15000ms</q> +So to google I went! And pasted <q>timed out because it queued and checked out the connection for longer than + 15000ms</q> and then I read -<a href="https://elixirforum.com/t/timed-out-because-it-queued-and-checked-out-the-connection-for-longer-than-15000ms/34793/4">a comment from al2o3cr</a> that said: +<a + href="https://elixirforum.com/t/timed-out-because-it-queued-and-checked-out-the-connection-for-longer-than-15000ms/34793/4">a + comment from al2o3cr</a> that said: <blockquote> <p>Usually that's an indication of database issues, from missing indexes to queries that need optimization.</p> |