nicholasjackson / bakery

Simple tool to backup and restore ChromeOS Crostini containers
MIT License
20 stars 3 forks source link

wish: add resumeability #4

Open markstos opened 4 years ago

markstos commented 4 years ago

My backup failed when starting the container:

Starting container penguin
[ERROR:utils.cc(50)] Failed to read message size from socket: Connection reset by peer
                                                                                      [ERROR:vsh_client.cc(209)] Failed to receive message from server: Connection reset by peer

The backup tool could be more robust if it assumed that any step might fail and throw and exception. It could then exit with message with to tell which problem needs to be mixed and provide an option to resume. A state file could be written out after each state is successfully completed. In this case, a helpful message might be:

"failed to start the penguin container. If you able to resolve the problem with this container starting, you can retry your backup command with the --resume flag to continue the backup from this stage.

nicholasjackson commented 4 years ago

Hey @markstos

I was planning on re-writing the tool to use the LXC libraries rather than shelling commands that would make it easier all round to implement new features. However this was always a stop gap until the backup feature came to Crostini. I have been pretty much using that since it released.