If you like to restore data from an older backup (snapshot) in case of
- data loss
- you like to have a data transfer from one database to another without influencing the former by this operation for some reason,
you can start the restore process on your own.
Table of contents
Process and Cost
A restore is made from a snapshot created in advance and creates a new database system!
The restore is not done onto the existing database instance. This means:
- actively used data is not overwritten
- data have to be copied from one database to another manually to replace as necessary
- additional cost will arise for the time the restore database exists based on the size of the db instances (which equals the size of the origin database)
You are able to log into your projects environment, e.g. prod and initiate a restore to the same environment prod by default. By using the optional --environment argument you are also allowed to initiate the restore database to be placed in another environment of the same project, e.g. test. However, you are not able to intiate a restore process for a database which is not part of your current project and environment. In other words you are able to push databases into other environments, but not to pull from them. The later is prohibited for security reasons (privilege escalation).
Backup Safety Copy
When a database restore is initiated a new snapshot is created and listed as "safety copy". This is done to prolong the availability of the data by project specific backup retention.
Imagine you have ordered a database restore of a snapshot, which had been deleted afterwards, because it's retention has ended. There was also a problem for whatever reason and the restored data is not usable anymore. You can reproduce the data anyway, using the identifier of the safety copy.
General usage instructions
The general unsage instructions for the cloud managment tool suite r3 can be found here.
Step-by-step guide
Show help context
Restore a database from a snapshot
Obtain the identifier of the snapshot, whose data you want to restore using "
r3 db list
".Initiate the restore process and wait until it finishes:
r3 db restore <snapshot-id>
Retrieve the database endpoint provided at the end of the process
Using the provided endpoint you can now proceed, e.g. connect to the database from the Jump-Server or any Web-Server
Database User and Password
On database restore, database users and passwords are inherited from the origin database, so you can connect seamlessly with your known credentials.
Related article