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 create and restore doesn't work correctly for accounts-only exports #517

Open
michielmulders opened this issue Nov 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@michielmulders
Copy link
Member

Description

When you export only accounts (hcli backup create --name 7-nov-2024 --accounts --safe) it will create a file like this accounts.backup.1730992758671.json.

The docs mentions you can only import state.backup.[...] files. But you can still import accounts.backup.[...] files. However, when you try this, it will overwrite the entire state with just the accounts contents, losing all state like operator accounts for the different networks.

Besides that, the --safe option prints a message Warning: The private keys were not removed from scripts while it did remove the private keys.

Steps to reproduce

  1. hcli backup create --name 7-nov-2024 --accounts --safe
  2. hcli backup restore -f accounts.backup.1730992758671.json

Additional context

Possible solution:

  • Add an argument to indicate which type of backup we are importing
  • Enforce naming conventions for different backup types and don't import if the naming is wrong (indicate in docs names can't be changed)

Verify this for all other types of backups as the same issue will likely occur there as well.

Hedera network

other

Version

latest

Operating system

None

@michielmulders michielmulders added the bug Something isn't working label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant