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

Provide optional automatic ledger/wallet backups before an upgrade #2198

Merged
merged 6 commits into from
Aug 14, 2019

Conversation

SergiySW
Copy link
Contributor

@SergiySW SergiySW commented Aug 5, 2019

@SergiySW SergiySW added this to the V20.0 milestone Aug 5, 2019
@SergiySW SergiySW self-assigned this Aug 5, 2019
nano/node/lmdb/lmdb.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@guilhermelawless guilhermelawless left a comment

Choose a reason for hiding this comment

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

For file names we could follow what was done in #1959 .
config.json -> config_backup_15571460497935531.json

@SergiySW
Copy link
Contributor Author

SergiySW commented Aug 5, 2019

@guilhermelawless imagine several data.ldb backups size

@guilhermelawless
Copy link
Contributor

guilhermelawless commented Aug 5, 2019

That's a good point. Can we then follow some other convention, for example data.ldb.bak and wallets.ldb.bak?

EDIT: We use backup.vacuum.ldb and snapshot.ldb for reference

@SergiySW
Copy link
Contributor Author

SergiySW commented Aug 5, 2019

I guess we can use config_backup_15571460497935531.json style for wallets (usually small size) & other for data.ldb

Print error if backup creation was failed
Copy link
Contributor

@guilhermelawless guilhermelawless left a comment

Choose a reason for hiding this comment

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

Works perfectly, only thing I would add is a cout and log message before starting the ledger backup as that can take a minute and it's easy to forget you set the backup option.

@schenkty
Copy link
Contributor

schenkty commented Aug 7, 2019

Why wouldn't this happen by default? Many of us service operators have run into countless issues where something is corrupt after an upgrade and we have to start from scratch. Would be awesome if it could backup automatically then I suppose delete the backup once everything is successful and just make it optional to retain the backup post upgrade

@guilhermelawless
Copy link
Contributor

@schenkty All it takes is changing a config flag then you're set for every future upgrade

Copy link
Contributor

@guilhermelawless guilhermelawless left a comment

Choose a reason for hiding this comment

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

Pending nano-docs PR or issue for the new config option

@cryptocode cryptocode added the toml TOML related change label Aug 7, 2019
@cryptocode
Copy link
Contributor

Adding toml label as backup_before_upgrade upgrade change will need to be reverted and placed into toml base file.

@guilhermelawless
Copy link
Contributor

This will have to be changed as #2203 was merged which creates the new config upgrade path.

@guilhermelawless guilhermelawless added the documentation This item indicates the need for or supplies updated or expanded documentation label Aug 13, 2019
SergiySW added a commit to SergiySW/nano-docs that referenced this pull request Aug 14, 2019
@SergiySW SergiySW merged commit 468a3f2 into nanocurrency:master Aug 14, 2019
zhyatt pushed a commit to nanocurrency/nano-docs that referenced this pull request Aug 14, 2019
* Update config.json file

with changes from PRs nanocurrency/nano-node#2198, nanocurrency/nano-node#2214

* Rewording
@wezrule wezrule mentioned this pull request Aug 19, 2019
cryptocode added a commit to cryptocode/raiblocks that referenced this pull request Aug 20, 2019
cryptocode added a commit that referenced this pull request Aug 23, 2019
* TOML config file support and migration

* Add config override support via a CLI option

* Incorporate config changes from #2214

* Remove deprecation as this currently fails to compile on CI

* Add default empty vector to read_node_config_toml

* Make sure override streams are not empty

* Adjust unit tests with changed base/override order

* Incorporate config changes from #2198 and reorder some methods

* httpcallback section, and documentation improvements

* Clarify data type for wallet account, formatting

* CI formatting

* Improved node config unit test coverage, address review feedback

* Full node and rpc config file coverage. Fix httpcallback deserialization.

* Improve toml diff test

* Use const ref in toml config, fix schema type for rpc_path

* Incorporate work watcher period from #2222

* Add work_watcher_period validation as well as unit test
GuyWhoKnowsTheGuy pushed a commit to GuyWhoKnowsTheGuy/nano-docs that referenced this pull request Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This item indicates the need for or supplies updated or expanded documentation enhancement toml TOML related change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants