Closed Mikelle closed 3 years ago
Awesome! Tested it in my node and it worked fine.
Since we have the whole backup in one file, what do you guys think about creating a new command like
backup-restore
to apply the backup from the zip file?it could be something like this
dist/heznode backup-restore --mode coord --cfg cmd/heznode/cfg.builder.toml --path /home/ubuntu/hez-node/file.zip
I'm also not sure about the
backup-restore
command name, naming things is hard! :(
I think it's a nice idea. Could you please open a new issue with this idea?
For sure! Here it is: https://github.com/hermeznetwork/hermez-node/issues/1100
Closes https://github.com/hermeznetwork/hermez-node/issues/897
What does this PR does?
This PR adds a new command backup
How to test?
dist/heznode backup --mode coord --cfg cmd/heznode/cfg.builder.toml --path /home/ubuntu/hez-node
- this is the new command. It creates a SQL dump of the Postgres DB, copies the last 10 BatchNums, current and last folders, and zip them to one file. Parameterpath
- it's where this zip will be located. Make sure, thatpg_dump
is installed on the machine, to be able to run this command.Checklist
These are the criteria that every PR should meet, please check them off as you review them: