Documentation

Learn how to create databases and use the REST API.

Visit the blog for in-depth articles and tutorials.

Join our FB group to interact with the restdb.io team and active users.


Snapps - clone your database

The Snapp feature lets you create complete clones of the full database state at any time (schema, collections, pages, data and media).

It's perfect for:

  • Custom backups / versions
  • Staging (development, test, production)
  • Distribution of complete application solutions and templates

Take a snapshot from an existing database

Navigate to Users and Settings in your database list and select the Snapps tab.

snapps

Click the Take Snapp button. Leave the checkbox off if the snapshot should be limited for restore to the same database only. Enable the checkbox if you wish to share the snapshot key for cloning this database image to other databases, e.g. from a development database to a production database.

snapp

Create a new database from a snapshot

This feature lets you create an exact clone of another database. It's useful as a starting point for a new database or as a distribution of a complete solution. In the main database list, click Create New button and enter a name and a valid snapshot key:

create-new

Restore from a previous version

Just click the Restore button and select the options for the restore operation.

restore

Restore from another snapshot

Just click the Restore With Key button.

restore-clone

Restore using API

A useful scenario for restdb.io Snapps is for testing. Using just a simple cURL script, a snapp key and the name of the "from" database, you can restore a database in a matter of seconds.

This is the format:

curl -k -H "Content-Type: application/json" -H "x-apikey: <target db apikey>" -X POST -d '{"snapid":"<snapp-id>","snapshot":"<source db name>"}' 'https://<target db name>.restdb.io/admin/snapshot/restore'

You can also control what you restore by adding more properties in the POST body:

{
  "snapid":"<snapp-id>",
  "snapshot":"<source db name>",
  "restore_media": true, 
  "restore_data":  true, 
  "restore_meta": true, 
  "restore_pages": true
}