Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update codefresh-on-prem-upgrade.md#574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions_docs/installation/codefresh-on-prem-upgrade.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -496,6 +496,8 @@ cd psqlbackup
docker run --rm --name postgresql-backup -e PGPASSWORD=$PGPASSWORD -v $(pwd):/app --net="host" bitnami/postgresql:13 pg_dump -Fc --dbname audit -h host.docker.internal -p 5432 -f /app/audit.dump
```

> The above command is true for Windows and macOS, for Linux users `host.docker.internal` has to be replaced with `127.0.0.1`

Here:
* The *--net* parameter lets the Docker container use the host's network stack and thereby gain access to the forwarded port.
* The *pg_dump* command connects to the PostgreSQL service and creates backup files in the */app* directory, which is mapped to the current directory (*psqlbackup/*) on the Docker host with the *-v* parameter.
Expand All@@ -519,6 +521,8 @@ cd psqlbackup
docker run --rm --name postgresql-backup -e PGPASSWORD=$PGPASSWORD -v $(pwd):/app --net="host" bitnami/postgresql:13 pg_restore --Fc --create --dbname postgres -h host.docker.internal -p 5432 /app/audit.dump
```

> The above command is true for Windows and macOS, for Linux users `host.docker.internal` has to be replaced with `127.0.0.1`

#### Backup and restore via Helm hooks

You can also run Postgresql database migration with `pre-upgrade` and `post-upgrade` helm hooks.
Expand DownExpand Up@@ -578,6 +582,8 @@ cd mongobackup
docker run --rm --name mongodb-backup -v $(pwd):/app --net="host" bitnami/mongodb:4.2 mongodump --host="host.docker.internal:27017" -u root -p $MONGODB_ROOT_PASSWORD -o /app
```

> The above command is true for Windows and macOS, for Linux users `host.docker.internal` has to be replaced with `127.0.0.1`

Here:
* The *--net* parameter lets the Docker container use the host's network stack and thereby gain access to the forwarded port.
* The *mongodump* command connects to the MongoDB service and creates backup files in the */app* directory, which is mapped to the current directory (*mongobackup/*) on the Docker host with the *-v* parameter.
Expand All@@ -600,6 +606,9 @@ kubectl port-forward --namespace codefresh svc/cf-mongodb 27017:27017 &
cd mondgobackup
docker run --rm --name mongodb-backup -v $(pwd):/app --net="host" bitnami/mongodb:4.2 mongorestore --host="host.docker.internal:27017" -u root -p $MONGODB_ROOT_PASSWORD /app
```

> The above command is true for Windows and macOS, for Linux users `host.docker.internal` has to be replaced with `127.0.0.1`

1. Stop the service port forwarding by terminating the background process.
1. Connect to the new stateful set and confirm that your data has been successfully restored:
```shell
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp