Data ManagementRestore Backup

Restore Backup

This section briefly describes various methods for restoring the backup of your service.

Database

PostgreSQL

Refer to the “Restore Backup” section on the PostgreSQL Service Template Page.

MySQL and MariaDB

Refer to the “Restore Backup” section on the MySQL Service Template Page and the MariaDB Service Template Page.

Redis

You can use the Redis RESTORE command to restore a backup.

Expand the Redis service’s “Command to connect to your Redis” string, and you will see something like this:

redis-cli -h <host> -p <port> -a <password>

Insert the <host>, <port>, and <password> into the following command:

cat /path/to/backup.rdb | redis-cli -h <host> -p <port> -a <password> -x RESTORE <key> 0

MongoDB

Expand the MongoDB service’s “Command to connect to your MongoDB” string, and you will see something like this:

mongosh "<connection string>"

Copy the <connection string> into the terminal and execute the mongorestore command to restore the backup:

mongorestore "<connection string>" "<backup directory>"

Volumes

If you want to restore data within volumes, you can refer to the Upload Directory method to upload the backup files to the target directory and decompress them.