aboutsummaryrefslogtreecommitdiff
path: root/content/blog/kubernetes
diff options
context:
space:
mode:
authorJulien Dessaux2021-03-23 22:38:09 +0100
committerJulien Dessaux2021-03-23 22:38:09 +0100
commitf5eb463f91836525239327537392fc4d65fcb542 (patch)
tree11d0000dfe9b5e6a29db1e3224ccf36841a64420 /content/blog/kubernetes
parentAdded an openbsd article and simplified all useless relref (diff)
downloadwww-f5eb463f91836525239327537392fc4d65fcb542.tar.gz
www-f5eb463f91836525239327537392fc4d65fcb542.tar.bz2
www-f5eb463f91836525239327537392fc4d65fcb542.zip
Cut down code quotes that were too long and disformed the blog template
Diffstat (limited to 'content/blog/kubernetes')
-rw-r--r--content/blog/kubernetes/pg_dump_restore.md7
1 files changed, 5 insertions, 2 deletions
diff --git a/content/blog/kubernetes/pg_dump_restore.md b/content/blog/kubernetes/pg_dump_restore.md
index fe99d06..17641d2 100644
--- a/content/blog/kubernetes/pg_dump_restore.md
+++ b/content/blog/kubernetes/pg_dump_restore.md
@@ -10,8 +10,11 @@ tags:
Assuming we are working with a postgresql statefulset, our namespace is named `miniflux` and our master pod is named `db-postgresql-0`, trying to
dump a database named `miniflux`:
{{< highlight sh >}}
-export POSTGRES_PASSWORD=$(kubectl get secret --namespace miniflux db-postgresql -o jsonpath="{.data.postgresql-password}" | base64 --decode)
-kubectl run db-postgresql-client --rm --tty -i --restart='Never' --namespace miniflux --image docker.io/bitnami/postgresql:11.8.0-debian-10-r19 --env="PGPASSWORD=$POSTGRES_PASSWORD" --command -- pg_dump --host db-postgresql -U postgres -d miniflux > miniflux.sql-2020062501
+export POSTGRES_PASSWORD=$(kubectl get secret --namespace miniflux db-postgresql \
+ -o jsonpath="{.data.postgresql-password}" | base64 --decode)
+kubectl run db-postgresql-client --rm --tty -i --restart='Never' --namespace miniflux \
+ --image docker.io/bitnami/postgresql:11.8.0-debian-10-r19 --env="PGPASSWORD=$POSTGRES_PASSWORD" \
+ --command -- pg_dump --host db-postgresql -U postgres -d miniflux > miniflux.sql-2020062501
{{< /highlight >}}
## Restoring