Back up and restore data
This section will describe how to use the Yugabyte Platform to back up and restore data in YCQL tables.
First, create a universe similar to the steps shown in Create universe . For the purposes of this demo you create a one-node cluster that looks something like this.
Wait for the universe to become ready.
Set storage for backup
In this example, you create a local directory on the tserver to back up to. Select the Connect modal in the Nodes tab of the universe and select the server from Admin Host.
Once you are connected using
ssh, create a directory
/backup and change the owner to
$ sudo mkdir /backup; sudo chown yugabyte /backup
Note that when you have more than one node, an
nfs mounted on each server is recommended, and
creating a local backup folder on each server will not work.
AWS cloud storage
You can also back up to Amazon cloud using the
amazon S3 tab in Backup configuration.
The Access Key & Secret text can be added for the IAM of the user. The destination S3 Bucket where backups are stored can be entered in the format shown in the sample above.
Back up data
Now, select Configuration on the left panel, select the Backup tab on top, click NFS and then enter
/backup as the NFS Storage Path before selecting Save.
Now, go to the Backups tab and then click Create Backup. A modal should appear where you can enter the table (this demo uses the default redis table) and NFS Storage option. If S3 was selected as the storage, the S3 Storage dropdown option can be chosen during this backup creation.
OK. If you refresh the page, you'll eventually see a completed task.
On that same completed task, click on the Actions dropdown and click Restore Backup. You will see a modal where you can select the universe, keyspace, and table you want to restore to. Enter in values like this (making sure to change the table name you restore to) and click OK.
If you now go to the Tasks tab, you will eventually see a completed Restore Backup task. To confirm this worked, go to the Tables tab to see both the original table and the table you restored to.