Skip to content

CreateBackup

POST
/hopbox.v1.MachineService/CreateBackup
curl --request POST \
--url https://example.com/hopbox.v1.MachineService/CreateBackup \
--header 'Connect-Protocol-Version: 1' \
--header 'Connect-Timeout-Ms: 1000' \
--header 'Content-Type: application/json' \
--data '{ "id": "example" }'

CreateBackup starts a backup of the main disk of a machine to the object storage of the install, and returns it at once, pending. The node pauses a running machine for the copy of its disk, and uploads the copy after the resume. Without object storage, the call fails with failed_precondition.

Connect-Protocol-Version
Connect-Protocol-Version

Define the version of the Connect protocol

number
Allowed value: 1

Define the version of the Connect protocol

Example

1
Connect-Timeout-Ms
Connect-Timeout-Ms

Define the timeout, in ms

number

Define the timeout, in ms

Example

1000
Media typeapplication/json
Any of:
id

CreateBackupRequest names the machine to back up.

object
id
id

Id is the UUID of the machine.

string
Any of:
Any of:

Example generated

{
"id": "example"
}

Success

Media typeapplication/json
CreateBackupResponse

CreateBackupResponse holds the new backup.

object
backup
backup

Backup is the new backup, pending.

object
id
id

Id is the UUID of the backup.

string
machineId
machine_id

Machine_id is the UUID of the machine.

string
machineName
machine_name

Machine_name is the name of the machine at the last backup or change.

string
kind
kind

Kind says who asked for the backup.

string
Allowed values: BACKUP_KIND_UNSPECIFIED BACKUP_KIND_MANUAL BACKUP_KIND_SCHEDULED
state
state

State is the state of the backup.

string
Allowed values: BACKUP_STATE_UNSPECIFIED BACKUP_STATE_PENDING BACKUP_STATE_COPIED BACKUP_STATE_UPLOADING BACKUP_STATE_DONE BACKUP_STATE_FAILED
error
error

Error says why a failed backup failed.

string
createTime
create_time

Create_time is when the backup was asked for.

string format: date-time
copyTime
copy_time

Copy_time is when the node copied the disk: the moment that the backup holds. Unset while pending.

string format: date-time
finishTime
finish_time

Finish_time is when the backup ended, done or failed.

string format: date-time
expireTime
expire_time

Expire_time is the end of the retention of the backup.

string format: date-time
diskBytes
disk_bytes

Disk_bytes is the size of the disk.

string format: int64
chunks
chunks

Chunks is the count of chunks of 4 MiB of the copy that hold data.

integer format: int32
chunksDone
chunks_done

Chunks_done is the count of chunks that the upload went through so far.

integer format: int32
newChunks
new_chunks

New_chunks is the count of chunks that the upload sent, because no earlier backup of the machine held them.

integer format: int32
dataBytes
data_bytes

Data_bytes are the bytes of the disk in the chunks so far.

string format: int64
uploadedBytes
uploaded_bytes

Uploaded_bytes are the bytes that the upload sent to the bucket, after the encryption.

string format: int64

Example

{
"backup": {
"kind": "BACKUP_KIND_UNSPECIFIED",
"state": "BACKUP_STATE_UNSPECIFIED",
"createTime": "2023-01-15T01:30:15.01Z",
"copyTime": "2023-01-15T01:30:15.01Z",
"finishTime": "2023-01-15T01:30:15.01Z",
"expireTime": "2023-01-15T01:30:15.01Z"
}
}

Error

Media typeapplication/json
Connect Error
object
code

The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].

string
Allowed values: canceled unknown invalid_argument deadline_exceeded not_found already_exists permission_denied resource_exhausted failed_precondition aborted out_of_range unimplemented internal unavailable data_loss unauthenticated
message

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.

string
details

A list of messages that carry the error details. There is no limit on the number of messages.

Array<object>

Contains an arbitrary serialized message along with a @type that describes the type of the serialized message, with an additional debug field for ConnectRPC error details.

object
type

A URL that acts as a globally unique identifier for the type of the serialized message. For example: type.googleapis.com/google.rpc.ErrorInfo.

string
value

The Protobuf message, serialized as bytes and base64-encoded. The specific message type is identified by the type field.

string format: byte
debug
Debug

Deserialized error detail payload. The ‘type’ field indicates the schema. This field is for easier debugging and should not be relied upon for application logic.

object
key
additional properties
any
key
additional properties
any
key
additional properties
any

Example

{
"code": "canceled"
}