User Tools

Site Tools


сервис_postgresql

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
сервис_postgresql [2025/05/13 13:24]
val [Потоковая репликация]
сервис_postgresql [2025/05/13 20:52] (current)
val [CloudNativePG Recovery]
Line 257: Line 257:
 kube1:~# kubectl -n my-postgres-ns exec -ti pod/​my-postgres-postgresql-0 -- env PGPASSWORD="​strongpassword"​ psql -U postgres -c "​CREATE USER keycloak WITH PASSWORD '​strongpassword';"​ kube1:~# kubectl -n my-postgres-ns exec -ti pod/​my-postgres-postgresql-0 -- env PGPASSWORD="​strongpassword"​ psql -U postgres -c "​CREATE USER keycloak WITH PASSWORD '​strongpassword';"​
  
-kube1:~# ssh gate cat /​tmp/​keycloak.dump | kubectl -n my-postgres-ns exec -i pod/​my-postgres-postgresql-0 -- env PGPASSWORD="​strongpassword"​ pg_restore -C -d postgres -U postgres+kube1:~# ssh gate.corp13.un ​cat /​tmp/​keycloak.dump | kubectl -n my-postgres-ns exec -i pod/​my-postgres-postgresql-0 -- env PGPASSWORD="​strongpassword"​ pg_restore -C -d postgres -U postgres
 </​code>​ </​code>​
  
Line 337: Line 337:
 kube1:​~/​my-pgcluster#​ kubectl -n my-pgcluster-ns apply -f my-scheduled-backup.yaml kube1:​~/​my-pgcluster#​ kubectl -n my-pgcluster-ns apply -f my-scheduled-backup.yaml
  
-kube1# kubectl -n my-pgcluster-ns describe ​backup ​my-scheduled-backup+kube1# kubectl -n my-pgcluster-ns describe ​backups.postgresql.cnpg.io ​my-scheduled-backup
  
-kube1# kubectl -n my-pgcluster-ns get backup+kube1# kubectl -n my-pgcluster-ns get backups.postgresql.cnpg.io
 </​code>​ </​code>​
  
Line 347: Line 347:
  
 <​code>​ <​code>​
-kube1:~/my-pgcluster#​ kubectl -n my-pgcluster-ns create secret generic minio-secret \+kube1:~# kubectl create ns my-pgcluster-ns 
 + 
 +kube1:~# kubectl -n my-pgcluster-ns create secret generic minio-secret \
   --from-literal=ACCESS_KEY_ID=root \   --from-literal=ACCESS_KEY_ID=root \
   --from-literal=ACCESS_SECRET_KEY=strongpassword   --from-literal=ACCESS_SECRET_KEY=strongpassword
сервис_postgresql.1747131869.txt.gz · Last modified: 2025/05/13 13:24 by val