When you flush a database, you remove all data. This is a prerequisite to deleting a database.

As you might expect, flushing a database permanently removes all data. The data cannot be recovered, except from backups made before flushing.

Consequently, we strongly recommend backing up databases before flushing them.

Use Redis-CLI to flush data

To flush data from a database:

  1. Connect to the database with Redis CLI.

  2. Use the FLUSHALL command:

redis-cli -h <hostname> -p <portnumber> -a <password> flushall

Example:

redis-cli -h redis-12345.c24.us-east-mz-1.ec2.cloud.redislabs.com -p 12345 -a xyz flushall