Book Image

Mastering RethinkDB

By : Shaikh
Book Image

Mastering RethinkDB

By: Shaikh

Overview of this book

RethinkDB has a lot of cool things to be excited about: ReQL (its readable,highly-functional syntax), cluster management, primitives for 21st century applications, and change-feeds. This book starts with a brief overview of the RethinkDB architecture and data modeling, and coverage of the advanced ReQL queries to work with JSON documents. Then, you will quickly jump to implementing these concepts in real-world scenarios, by building real-time applications on polling, data synchronization, share market, and the geospatial domain using RethinkDB and Node.js. You will also see how to tweak RethinkDB's capabilities to ensure faster data processing by exploring the sharding and replication techniques in depth. Then, we will take you through the more advanced administration tasks as well as show you the various deployment techniques using PaaS, Docker, and Compose. By the time you have finished reading this book, you would have taken your knowledge of RethinkDB to the next level, and will be able to use the concepts in RethinkDB to develop efficient, real-time applications with ease.
Table of Contents (11 chapters)

Performing a manual and automatic backup in RethinkDB


RethinkDB allows you to take a backup of the data while the system is running without affecting any other operations. Generally, in traditional databases you need to provide a locking mechanism to perform the backup, which eventually affects the working system. RethinkDB lets you back up or restore the database with no such constraints.

RethinkDB uses a client driver to perform the backup, which provides the concurrency facility, so it doesn't lock any clients while the backup process is running.

RethinkDB provides two utilities to perform the backup and restore:

  • dump performs the backup of the cluster, database, or table

  • restore performs the restore operation after backup

Along with learning how to take a backup of the system, it is equally and crucially important to learn how to use that backup to restore the system. We will cover restoration in the next section.

To back up the entire cluster of various RethinkDB instances, run the following...