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

Backup config files when upgrading #1959

Merged
merged 3 commits into from May 9, 2019

Conversation

@wezrule
Copy link
Collaborator

commented May 6, 2019

It's reasonable practice to create backups of files which the user is allowed to modify if you are going to modify them. There were also multiple times during the v19 RC1 period where having the original config file beta testers were using before an upgrade would have been useful.

During any upgrades of the config a new file will be created, for instance: config_backup_15571460497935531.json

Note: It might look initially strange during upgrades from v18 as the new rpc_config.json will have an initial backup because the migration only copies things from the original config.json, all the new options for the rpc are done in an upgrade. This can be added to documentation as expected behaviour.

@wezrule wezrule added this to the V19.0 milestone May 6, 2019

@wezrule wezrule requested a review from argakiig May 6, 2019

@wezrule wezrule self-assigned this May 6, 2019

@wezrule wezrule added this to During RC in V19 May 6, 2019

@argakiig
Copy link
Collaborator

left a comment

LGTM but test would be nice :)

@wezrule

This comment has been minimized.

Copy link
Collaborator Author

commented May 7, 2019

LGTM but test would be nice :)

Yep good idea. It actually helped uncover a bug where the backup file is always created, even when creating a fresh one (not upgrading). Also got rid of an unnecessary template parameter declaration for the read function.

@wezrule wezrule requested a review from argakiig May 7, 2019

@wezrule wezrule merged commit 29ec4f5 into nanocurrency:master May 9, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@wezrule wezrule deleted the wezrule:backup_config_file_on_upgrade branch May 9, 2019

@zhyatt zhyatt moved this from During RC to RC 3 (TBD) in V19 May 12, 2019

argakiig added a commit to argakiig/raiblocks that referenced this pull request May 22, 2019

Backup config files when upgrading (nanocurrency#1959)
* Backup config files if upgrading

* Add test

* Formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.