`lxd recover` as a non-interactive command for specific container recoveries

Hi @tomp ,

before the release of the new disaster recovery tool I used the import command
lxd import foo --force
to import containers inside my restore-scripts that sync’ed the data beforehand by rsync into the appropriate directory.
In this restore-process the container name foo might have been changed from the original name with intension. For example to setup a test environment from a rsync backup of a production environment with a different container name.

It would be great to extend lxd recover in the following way:

  • a flag for non-interactive execution
  • with a parameter that refers to the recovery of a specific container
  • and a ‘–force’ parameter that ignores a difference between the container name in metadata.yml and the given container name parameter in the command

Thanks a lot for your work!
Florian

1 Like

Backward compatibility would be nice.