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
Contributor

@wezrule wezrule 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 documentation This item indicates the need for or supplies updated or expanded documentation functionality quality improvements This item indicates the need for or supplies a better way to implement existing functionality labels May 6, 2019
@wezrule wezrule added this to the V19.0 milestone May 6, 2019
@wezrule wezrule requested a review from argakiig May 6, 2019 13:01
@wezrule wezrule self-assigned this May 6, 2019
Copy link
Contributor

@argakiig argakiig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but test would be nice :)

@wezrule
Copy link
Contributor Author

wezrule 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 08:44
@wezrule wezrule merged commit 29ec4f5 into nanocurrency:master May 9, 2019
@wezrule wezrule deleted the backup_config_file_on_upgrade branch May 9, 2019 15:09
@zhyatt zhyatt removed the documentation This item indicates the need for or supplies updated or expanded documentation label Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
functionality quality improvements This item indicates the need for or supplies a better way to implement existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants