New Juju restore tool - available for testing

Hi everyone -

We’re currently building a standalone tool to restore backups on a Juju controller. This should be easier to use and more flexible than the current juju restore-backup functionality. It’ll also have better support for the disaster recovery case, where the original controller has been completely lost and the backup is being restored to a new controller.

We’re developing juju-restore as a separate project from Juju so it can have its own releases and cadence.

The current version is v0.5 - at the moment it only supports restoring a backup to the same controller (with the same Juju version and HA configuration). The next step is to handle downgrading Juju version, and then after that we’ll move on to the disaster recover scenario.

The tool’s not ready for production use yet. That said, it would be hugely useful to us to find any bugs early! If you have a staging controller that you can afford to rebuild, and you’re interested in taking it for a spin, please try it out and let us know how it went. (We haven’t seen any catastrophic bugs so far, but it’s always a possibility.)

Thanks!

1 Like

From the juju-restore readme:

The expected usage is to copy the juju-restore binary and the backup
file to the primary controller machine and then run it:

    ./juju-restore --username machine-n --password mongo-password /path/to/backup/file

Username and password should be the `tag` and `statepassword` fields
from the machine agent's config file:
`/var/lib/juju/agents/machine-<n>/agent.conf`

If the --username and --password are to be extracted from the agent.conf file, why does the juju-restore script not do that itself?

I didn’t work out that the tag/statepassword combination worked until Friday, so I haven’t gone back and added it to juju-restore yet. Before that we were using admin/oldpassword. Since that was specific to the bootstrap controller machine we couldn’t get it from the agent.conf on the current machine. (The primary is often not the original bootstrap machine, especially after you’ve gone through a few restore cycles!)

But I’m definitely going to change it to get the details automatically when it can.