How to create a database backup/database snapshot?

With the root360 platform we offer our customers the possibility to create snapshots of their database instances outside the existing backup plans. A snapshot of a complete instance including all logical databases is created.


During the creation of snapshots, there may be a small loss of database performance and no reconfiguration of the database is possible during this time.

Preconditions

To take a snapshot of an existing database instance you must first connect to the bastion host.

Step 1 - Obtain the identifier of the database

Obtain the identifier of the database by listing the available databases using the r3 db list command.

~$ r3 db list Environment: prod Company: root360 Project: service +---------------------------------------+--------------------+--------+-----------+----------------------------+ | SnapshotIdentifier | DataBaseIdentifier | Engine | Status | CreationTime | +---------------------------------------+--------------------+--------+-----------+----------------------------+ | manual-rrgl3r5qn68j1-2017-11-21-12-50 | rrgl3r5qn68j1 | mysql | creating | 2017-11-21 12:50:25.246740 | | rds:rrgl3r5qn68j1-2017-11-14-00-19 | rrgl3r5qn68j1 | mysql | available | 2017-11-14_00:19:42 | | rds:rrgl3r5qn68j1-2017-11-15-00-19 | rrgl3r5qn68j1 | mysql | available | 2017-11-15_00:19:48 | | rds:rrgl3r5qn68j1-2017-11-16-00-19 | rrgl3r5qn68j1 | mysql | available | 2017-11-16_00:19:24 | | rds:rrgl3r5qn68j1-2017-11-17-00-19 | rrgl3r5qn68j1 | mysql | available | 2017-11-17_00:19:29 | | rds:rrgl3r5qn68j1-2017-11-18-00-19 | rrgl3r5qn68j1 | mysql | available | 2017-11-18_00:19:49 | | rds:rrgl3r5qn68j1-2017-11-19-00-19 | rrgl3r5qn68j1 | mysql | available | 2017-11-19_00:19:54 | | rds:rrgl3r5qn68j1-2017-11-20-00-19 | rrgl3r5qn68j1 | mysql | available | 2017-11-20_00:19:50 | | rds:rrgl3r5qn68j1-2017-11-21-00-19 | rrgl3r5qn68j1 | mysql | available | 2017-11-21_00:19:28 | +---------------------------------------+--------------------+--------+-----------+----------------------------+

Step 2 - create the snapshot

To create the snapshot we use the command r3 db snapshot [identifier] with the database identifier from step 1.

~$ r3 db snapshot rrgl3r5qn68j1 # Response Company: root360 Project: service Environment: prod Started creation of new Snapshot: manual-rrgl3r5qn68j1-2017-11-21-12-50 This process can take up to 15 Minutes to finish! ~$ r3 db list Environment: prod Company: root360 Project: service +---------------------------------------+--------------------+--------+-----------+----------------------------+ | SnapshotIdentifier | DataBaseIdentifier | Engine | Status | CreationTime | +---------------------------------------+--------------------+--------+-----------+----------------------------+ | manual-rrgl3r5qn68j1-2017-11-21-12-50 | rrgl3r5qn68j1 | mysql | creating | 2017-11-21 12:50:25.246740 | | rds:rrgl3r5qn68j1-2017-11-14-00-19 | rrgl3r5qn68j1 | mysql | available | 2017-11-14_00:19:42 | | rds:rrgl3r5qn68j1-2017-11-15-00-19 | rrgl3r5qn68j1 | mysql | available | 2017-11-15_00:19:48 | | rds:rrgl3r5qn68j1-2017-11-16-00-19 | rrgl3r5qn68j1 | mysql | available | 2017-11-16_00:19:24 | | rds:rrgl3r5qn68j1-2017-11-17-00-19 | rrgl3r5qn68j1 | mysql | available | 2017-11-17_00:19:29 | | rds:rrgl3r5qn68j1-2017-11-18-00-19 | rrgl3r5qn68j1 | mysql | available | 2017-11-18_00:19:49 | | rds:rrgl3r5qn68j1-2017-11-19-00-19 | rrgl3r5qn68j1 | mysql | available | 2017-11-19_00:19:54 | | rds:rrgl3r5qn68j1-2017-11-20-00-19 | rrgl3r5qn68j1 | mysql | available | 2017-11-20_00:19:50 | | rds:rrgl3r5qn68j1-2017-11-21-00-19 | rrgl3r5qn68j1 | mysql | available | 2017-11-21_00:19:28 | +---------------------------------------+--------------------+--------+-----------+----------------------------+

Summary

In step 1, we used the r3 db list command to display the identifier for the database for which we want to create a backup. In the second step, we used the database identifier from step 1 to create the snapshot using the r3 command r3 db snapshot [identifier].

 


Related tutorials

Related components


root360 Knowledge Base - This portal is hosted by Atlassian (atlassian.com | Privacy Policy)