Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explain v0 to v1 migration #2475

Merged
merged 1 commit into from
Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 5 additions & 1 deletion cmd/porter/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ Before running this command, you should have:
3. Created a new PORTER_HOME directory for the new version of Porter, for example: mkdir ~/.porter.
4. Configured a default storage account for the new version of Porter. The data from the old account will be migrated into the default storage account.

This upgrades the data to the current storage schema, and does not change the data stored in the old account.`,
This upgrades the data to the current storage schema, and does not change the data stored in the old account.

This command may be repeated if it fails, is interrupted when first run, or new v0 data has been added.
Porter will restart the migration from the beginning and overwrite any previously migrated records.
🚨 After you use Porter v1 with the migrated database, DO NOT RERUN THE MIGRATION because subsequent migrations will overwrite data in the v1 database.`,
Example: ` porter storage migrate --old-home ~/.porterv0
porter storage migrate --old-account my-azure --old-home ~/.porterv0
porter storage migrate --namespace new-namespace --old-home ~/.porterv0
Expand Down
4 changes: 4 additions & 0 deletions docs/content/cli/storage_migrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Before running this command, you should have:

This upgrades the data to the current storage schema, and does not change the data stored in the old account.

This command may be repeated if it fails, is interrupted when first run, or new v0 data has been added.
Porter will restart the migration from the beginning and overwrite any previously migrated records.
🚨 After you use Porter v1 with the migrated database, DO NOT RERUN THE MIGRATION because subsequent migrations will overwrite data in the v1 database.

```
porter storage migrate --old-home OLD_PORTER_HOME [--old-account STORAGE_NAME] [--namespace NAMESPACE] [flags]
```
Expand Down
5 changes: 5 additions & 0 deletions docs/content/storage-migrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ By default, Porter migrates your data into the [current namespace](/configuratio
Porter v0 doesn't have the concept of namespaces, and effectively everything was defined in the global (empty) namespace.
We recommend using the \--namespace flag and being explicit about where the data should be migrated.

The migrate command may be repeated if it fails, is interrupted when first run, or new v0 data has been added.
Porter will restart the migration from the beginning and overwrite any previously migrated records.

🚨 **After you start using Porter v1 with the migrated database DO NOT RERUN THE MIGRATION because the migration will overwrite changes made to records in the new v1 database.**

[porter storage migrate]: /cli/porter_storage_migrate/

## 7. View Your Migrated Data
Expand Down