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

Migrate persistent storage from previous MO versions #355

Merged
merged 5 commits into from
Aug 15, 2024
Merged

Conversation

matth-x
Copy link
Owner

@matth-x matth-x commented Aug 15, 2024

Automatically migrate the persistent storage of MO on the controller if it originates from a previous MO version.

The persistent storage is extended and optimized in some new releases of MO, making the storage layout backwards-incompatible. To allow existing deployments to be continuously updated, it's necessary to handle the storage changes. The built-in migration is guaranteed to work from v1.2.0 onward. There could be some storage artifacts from before v1.2.0 which are not fully handled.

Examples includes:

  • The transaction store has been refactored in Support TransactionMessageAttempts and -RetryInterval #345. The migration function clears existing tx store files (if a FW update happened, then it is very likely that the charger was online and all transactions have been fully uploaded, so no data loss)
  • In v0.3, the name of the main configurations file was "arduino-ocpp.cnf" which was later renamed into "ocpp-config.jsn". That file is removed without transferring its contents which is an example of the migration being limited to fully work only from this version on. However, if migrating from v1.0 or v1.1, then there are no known limitations.

@matth-x matth-x merged commit ed3034f into main Aug 15, 2024
5 checks passed
@matth-x matth-x deleted the feature/migration branch August 15, 2024 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant