aptible backup:restore
This command is used to restore from a Database Backup. This command creates a new database: it does not overwrite your existing database. In fact, it doesn’t interact with your existing database at all. Since this is a new Database, Databases are created with General Purpose Container Profile, which is the default Container Profile.
You’ll need the ID of an existing Backup to use this command. You can find those IDs using the aptible backup:list
command or through the Dashboard.
Synopsis
Examples
Restore a Backup
Customize the new Database
You can also customize the new Database that will be created from the Backup:
If no handle is provided, it will default to $DB_HANDLE-at-$BACKUP_DATE
where $DB_HANDLE
is the handle of the Database the backup was taken from. Database handles must:
- Only contain lowercase alphanumeric characters,
.
,_
, or-
- Be between 1 to 64 characters in length
- Be unique within their Environment
Therefore, there are two situations where the default handle can be invalid:
- The handle is longer than 64 characters. The default handle will be 23 characters longer than the original Database’s handle.
- The default handle is not unique within the Environment. Most likely, this would be caused by restoring the same backup to the same Environment multiple times.
Restore to a different Environment
You can restore Backups across Environments as long as they are hosted on the same type of Stack. You can only restore Backups from a Dedicated Stack in another Dedicated Stack and backups from a Shared Stack in another Shared Stack. Since Environments are globally unique, you do not need to specify the Stack in your command:
Container Sizes (MB)
General Purpose(M): 512, 1024, 2048, 4096, 7168, 15360, 30720, 61440, 153600, 245760
Was this page helpful?