backups
Creates, updates, deletes, gets or lists a backups
resource.
Overview
Name | backups |
Type | Resource |
Id | linode.linode.backups |
Fields
The following fields are returned by SELECT
queries:
- get_backup
- get_backups
A single Backup.
Name | Datatype | Description |
---|---|---|
id | integer | Read-only The unique ID of this Backup. |
available | boolean | Read-only Whether this Backup is available for restoration. Backups undergoing maintenance are not available for restoration. |
configs | array | Read-only A list of the labels of the Configuration profiles that are part of the Backup. |
created | string (date-time) | Read-only The date the Backup was taken. (example: 2018-01-15T00:01:01) |
disks | array | Read-only A list of the disks that are part of the Backup. |
finished | string (date-time) | Read-only The date the Backup completed. (example: 2018-01-15T00:01:01) |
label | string | A label for Backups that are of type snapshot . (example: Webserver-Backup-2018) |
status | string | Read-only The current state of a specific Backup. (example: successful) |
type | string | Read-only This indicates whether the Backup is an automatic Backup or manual snapshot taken by the User at a specific point in time. (example: snapshot) |
updated | string (date-time) | Read-only The date the Backup was most recently updated. (example: 2018-01-15T00:01:01) |
A collection of the specified Linode's available backups.
Name | Datatype | Description |
---|---|---|
automatic | array | |
snapshot | object |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_backup | select | Returns information about a Backup. Learn more... Learn more... | ||
get_backups | select | Returns information about this Linode's available backups. Learn more... Learn more... | ||
post_snapshot | insert | data__label | Creates a snapshot backup of a Linode. > 📘 > > - Backups aren't encrypted even when they're taken from an encrypted disk. When a backup is restored, and if encryption is enabled, the data stored on the disk is encrypted again. > > - If you already have a snapshot of this Linode, the previous snapshot will be deleted. Learn more... Learn more... | |
post_cancel_backups | exec | Cancels the Backup service on the given Linode. Deletes all of this Linode's existing backups forever. Learn more... Learn more... | ||
post_enable_backups | exec | Enables backups for the specified Linode. > 📘 > > Backups aren't encrypted even when they're taken from an encrypted disk. When a backup is restored, and if encryption is enabled, the data stored on the disk is encrypted again. Learn more... Learn more... | ||
post_restore_backup | exec | linode_id | Restores a Linode's backup to the specified Linode. - Backups may not be restored across regions. - Only successfully completed backups that are not undergoing maintenance can be restored. - The Linode that the backup is being restored to can't be the target of a current backup. When you restore a backup, the restored disk is assigned the same UUID as the original disk. In most cases, this is acceptable and doesn't cause issues. However, if you try to mount both the original disk and the corresponding restore disk at the same time (by assigning them both to devices in your Configuration Profile's Block Device Assignment), you'll encounter a UUID "collision". When this happens, the system selects, and mounts, only one of the disks at random. This is because both disks are sharing the same UUID. Your instance may fail to boot because the API can't tell which disk is root. If your system boots in this scenario, you won't see an immediate indication if you're booted into the restored disk or the original disk, and you'll be unable to access both disks at the same time. To avoid this, only restore a backup to the same Linode if you don't intend to mount them at the same time, or you're comfortable modifying UUIDs. If you need access to files on both the original disk and the restored disk simultaneously -- for example, if you need to copy files between them -- you should restore the backup to a separate Linode or create a new Linode using the desired backup_id .To learn more about block device assignments and viewing your disks' UUIDs, see our guide on Configuration Profiles. > 📘 > > Backups aren't encrypted even when they're taken from an encrypted disk. When a backup is restored, and if encryption is enabled, the data stored on the disk is encrypted again. Learn more... Learn more... |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|
SELECT
examples
- get_backup
- get_backups
Returns information about a Backup.
Learn more...
Learn more...
SELECT
id,
available,
configs,
created,
disks,
finished,
label,
status,
type,
updated
FROM linode.linode.backups;
Returns information about this Linode's available backups.
Learn more...
Learn more...
SELECT
automatic,
snapshot
FROM linode.linode.backups;
INSERT
examples
- post_snapshot
- Manifest
Creates a snapshot backup of a Linode.
> 📘
>
> - Backups aren't encrypted even when they're taken from an encrypted disk. When a backup is restored, and if encryption is enabled, the data stored on the disk is encrypted again.
>
> - If you already have a snapshot of this Linode, the previous snapshot will be deleted.
Learn more...
Learn more...
INSERT INTO linode.linode.backups (
data__label
)
SELECT
'{{ label }}' --required
RETURNING
id,
available,
configs,
created,
disks,
finished,
label,
status,
type,
updated
;
# Description fields are for documentation purposes
- name: backups
props:
- name: label
value: string
description: >
The label for the new snapshot.
Lifecycle Methods
- post_cancel_backups
- post_enable_backups
- post_restore_backup
Cancels the Backup service on the given Linode. Deletes all of this Linode's existing backups forever.
Learn more...
Learn more...
EXEC linode.linode.backups.post_cancel_backups
;
Enables backups for the specified Linode.
> 📘
>
> Backups aren't encrypted even when they're taken from an encrypted disk. When a backup is restored, and if encryption is enabled, the data stored on the disk is encrypted again.
Learn more...
Learn more...
EXEC linode.linode.backups.post_enable_backups
;
Restores a Linode's backup to the specified Linode.
- Backups may not be restored across regions.
- Only successfully completed backups that are not undergoing maintenance can be restored.
- The Linode that the backup is being restored to can't be the target of a current backup.
When you restore a backup, the restored disk is assigned the same UUID as the original disk. In most cases, this is acceptable and doesn't cause issues. However, if you try to mount both the original disk and the corresponding restore disk at the same time (by assigning them both to devices in your Configuration Profile's Block Device Assignment), you'll encounter a UUID "collision".
When this happens, the system selects, and mounts, only one of the disks at random. This is because both disks are sharing the same UUID. Your instance may fail to boot because the API can't tell which disk is root. If your system boots in this scenario, you won't see an immediate indication if you're booted into the restored disk or the original disk, and you'll be unable to access both disks at the same time.
To avoid this, only restore a backup to the same Linode if you don't intend to mount them at the same time, or you're comfortable modifying UUIDs. If you need access to files on both the original disk and the restored disk simultaneously -- for example, if you need to copy files between them -- you should restore the backup to a separate Linode or create a new Linode using the desired backup_id
.
To learn more about block device assignments and viewing your disks' UUIDs, see our guide on Configuration Profiles.
> 📘
>
> Backups aren't encrypted even when they're taken from an encrypted disk. When a backup is restored, and if encryption is enabled, the data stored on the disk is encrypted again.
Learn more...
Learn more...
EXEC linode.linode.backups.post_restore_backup
@@json=
'{
"linode_id": {{ linode_id }},
"overwrite": {{ overwrite }}
}';