Restores a backup to a server that is in a CONNECTION_LOST
, HEALTHY
, RUNNING
, UNHEALTHY
, or TERMINATED
state. When you run RestoreServer, the server's EC2 instance is deleted, and a new EC2 instance is configured. RestoreServer maintains the existing server endpoint, so configuration management of the server's client devices (nodes) should continue to work.
See https://www.paws-r-sdk.com/docs/opsworkscm_restore_server/ for full documentation.
opsworkscm_restore_server(
BackupId,
ServerName,
InstanceType = NULL,
KeyPair = NULL
)
[required] The ID of the backup that you want to use to restore a server.
[required] The name of the server that you want to restore.
The type of instance to restore. Valid values must be specified in the
following format: ^([cm][34]|t2).*
For example, m5.large
. Valid
values are m5.large
, r5.xlarge
, and r5.2xlarge
. If you do not
specify this parameter, RestoreServer uses the instance type from the
specified backup.
The name of the key pair to set on the new EC2 instance. This can be helpful if the administrator no longer has the SSH key.