Skip to main content

backups

Creates, updates, deletes, gets or lists a backups resource.

Overview

Namebackups
TypeResource
Idlinode.linode.backups

Fields

The following fields are returned by SELECT queries:

A single Backup.

NameDatatypeDescription
idintegerRead-only The unique ID of this Backup.
availablebooleanRead-only Whether this Backup is available for restoration. Backups undergoing maintenance are not available for restoration.
configsarrayRead-only A list of the labels of the Configuration profiles that are part of the Backup.
createdstring (date-time)Read-only The date the Backup was taken. (example: 2018-01-15T00:01:01)
disksarrayRead-only A list of the disks that are part of the Backup.
finishedstring (date-time)Read-only The date the Backup completed. (example: 2018-01-15T00:01:01)
labelstringA label for Backups that are of type snapshot. (example: Webserver-Backup-2018)
statusstringRead-only The current state of a specific Backup. (example: successful)
typestringRead-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)
updatedstring (date-time)Read-only The date the Backup was most recently updated. (example: 2018-01-15T00:01:01)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_backupselectReturns information about a Backup.

Learn more...

Learn more...
get_backupsselectReturns information about this Linode's available backups.

Learn more...

Learn more...
post_snapshotinsertdata__labelCreates 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_backupsexecCancels the Backup service on the given Linode. Deletes all of this Linode's existing backups forever.

Learn more...

Learn more...
post_enable_backupsexecEnables 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_backupexeclinode_idRestores 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.

NameDatatypeDescription

SELECT examples

Returns information about a Backup.

Learn more...

Learn more...

SELECT
id,
available,
configs,
created,
disks,
finished,
label,
status,
type,
updated
FROM linode.linode.backups;

INSERT examples

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
;

Lifecycle Methods

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 
;