fix bash command highlighting
This commit is contained in:
parent
6be081387b
commit
5142def5ad
|
@ -2,8 +2,8 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<channel><title>blog // ~ben</title><link>https://tilde.team/~ben/blog/index.html</link>
|
||||
<description>a blog about tildes and other things</description><language>en</language>
|
||||
<lastBuildDate>Wed, 28 Oct 2020 16:33:00 -0400</lastBuildDate>
|
||||
<pubDate>Wed, 28 Oct 2020 16:33:00 -0400</pubDate>
|
||||
<lastBuildDate>Wed, 28 Oct 2020 17:15:32 -0400</lastBuildDate>
|
||||
<pubDate>Wed, 28 Oct 2020 17:15:32 -0400</pubDate>
|
||||
<atom:link href="https://tilde.team/~ben/blog/feed.rss" rel="self" type="application/rss+xml">
|
||||
<item><title>
|
||||
mastodon postgres upgrade fun
|
||||
|
|
|
@ -64,17 +64,25 @@ encoding somehow. this is not a situation we want to be in. time to fix it.</p>
|
|||
<p>here’s the new plan:</p>
|
||||
|
||||
<ul>
|
||||
<li>stop mastodon
|
||||
for i in streaming sidekiq web; do systemctl stop mastodon-$i; done</li>
|
||||
<li>dump current database state
|
||||
pg_dump mastodon_production > db.dump</li>
|
||||
<li>drop and recreate cluster with utf8 encoding
|
||||
pg_dropcluster 13 main –stop
|
||||
pg_createcluster –locale=en_US.UTF8 13 main –start</li>
|
||||
<li>restore backup
|
||||
sudo -u postgres psql -c “create user mastodon createdb;”
|
||||
sudo -u mastodon createdb -E utf8 mastodon_production
|
||||
sudo -u mastodon psql < db.dump</li>
|
||||
<li><p>stop mastodon
|
||||
<code>
|
||||
for i in streaming sidekiq web; do systemctl stop mastodon-$i; done
|
||||
</code></p></li>
|
||||
<li><p>dump current database state
|
||||
<code>
|
||||
pg_dump mastodon_production > db.dump
|
||||
</code></p></li>
|
||||
<li><p>drop and recreate cluster with utf8 encoding
|
||||
<code>
|
||||
pg_dropcluster 13 main --stop
|
||||
pg_createcluster --locale=en_US.UTF8 13 main --start
|
||||
</code></p></li>
|
||||
<li><p>restore backup
|
||||
<code>
|
||||
sudo -u postgres psql -c "create user mastodon createdb;"
|
||||
sudo -u mastodon createdb -E utf8 mastodon_production
|
||||
sudo -u mastodon psql < db.dump
|
||||
</code></p></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
|
|
@ -28,16 +28,27 @@ encoding somehow. this is not a situation we want to be in. time to fix it.
|
|||
here's the new plan:
|
||||
|
||||
- stop mastodon
|
||||
for i in streaming sidekiq web; do systemctl stop mastodon-$i; done
|
||||
```
|
||||
for i in streaming sidekiq web; do systemctl stop mastodon-$i; done
|
||||
```
|
||||
|
||||
- dump current database state
|
||||
pg_dump mastodon_production > db.dump
|
||||
```
|
||||
pg_dump mastodon_production > db.dump
|
||||
```
|
||||
|
||||
- drop and recreate cluster with utf8 encoding
|
||||
pg_dropcluster 13 main --stop
|
||||
pg_createcluster --locale=en_US.UTF8 13 main --start
|
||||
```
|
||||
pg_dropcluster 13 main --stop
|
||||
pg_createcluster --locale=en_US.UTF8 13 main --start
|
||||
```
|
||||
|
||||
- restore backup
|
||||
sudo -u postgres psql -c "create user mastodon createdb;"
|
||||
sudo -u mastodon createdb -E utf8 mastodon_production
|
||||
sudo -u mastodon psql < db.dump
|
||||
```
|
||||
sudo -u postgres psql -c "create user mastodon createdb;"
|
||||
sudo -u mastodon createdb -E utf8 mastodon_production
|
||||
sudo -u mastodon psql < db.dump
|
||||
```
|
||||
|
||||
i'm still not 100% sure how the encoding reverted to ascii but
|
||||
it seems that the locale was not correctly set while running the
|
||||
|
|
Loading…
Reference in New Issue