Backup and restore

This section will describe how to back up and restore tables using the YugabyteDB Admin Console.

Create universe

First, create a universe similar to steps shown in Create universe.For the purposes of this demo we create a 1 node cluster that looks something like this.

Create universe 1 Node

Wait for the universe to become ready.

Setting storage for backup

Local storage

In this example, we create a local directory on the tserver to backup to. Select theConnect modal in the Nodes tab of the universe and select the server from Admin Host.

Connect Modal

Once you are sshed in, create a directory /backup and change the owner to yugabyte.

  1. $ sudo mkdir /backup; sudo chown yugabyte /backup

Note that when there are more than 1 nodes, an nfs mounted on each server is recommended, andcreating a local backup folder on each server will not work.

AWS cloud storage

One can also backup to Amazon cloud using the amazon S3 tab in Backup configuration.

AWS Backup

The Access Key & Secret text can be added for the IAM of the user. The destination S3 Bucket where backups arestored can be entered in the format shown in the sample above.

Backup

Now, select Configuration on the left panel, select the Backup tab on top, click NFS and enter/backup as the NFS Storage Path before selecting Save.

Cloud Provider Configuration

Now, go to the Backups tab. There, click on Create Backup. A modal should appear where you canenter the table (this demo uses the default redis table) and NFS Storage option. If S3 was selectedas the storage, the “S3 Storage” dropdown option can be chosen during this backup creation.

Backup Modal

Select OK. If you refresh the page, you’ll eventually see a completed task.

Restore

On that same completed task, click on the Actions dropdown and click on Restore Backup.You will see a modal where you can select the universe, keyspace, and table you want to restore to. Enter invalues like this (making sure to change the table name you restore to) and click OK.

Restore Modal

If you now go to the Tasks tab, you will eventually see a completed Restore Backup task. Toconfirm this worked, go to the Tables tab to see both the original table and the table yourestored to.

Tables View