Automatic, encrypted backups to your own Google Drive.See plans →

Restore a backup

Restoring means putting a backup back into a database. It usually needs someone comfortable with the server's command line. Ask your developer or IT person to follow these steps.

Restoring overwrites data. If you restore into a live database, any changes made since the backup are lost. When unsure, restore into a new database first, check it, then switch over.

1. Download the backup

  1. In the dashboard, open Backups, find the backup you want, and click Open in Drive. (Or browse FlashBackup in Google Drive.)
  2. Download the file. It ends in .fbk.
  3. Copy it to the server, for example:
    scp shop_2026-11-12_0200UTC.sql.gz.fbk ubuntu@your-server:/tmp/

2. Decrypt it

On the server where the agent is installed (it already has the key):

sudo flashbackup-agent decrypt /tmp/shop_2026-11-12_0200UTC.sql.gz.fbk

This creates /tmp/shop_2026-11-12_0200UTC.sql, already unzipped.

On a different machine, pass the key yourself. Any computer with Node.js 18+ can run the agent file:

curl -fsSLO https://flashbackup.com.ng/downloads/flashbackup-agent.js
node flashbackup-agent.js decrypt backup.sql.gz.fbk --key "YOUR-ENCRYPTION-KEY"

If you see "Wrong encryption key, or the file is damaged", the key does not belong to the server that made the backup.

3. Restore into the database

MySQL / MariaDB

# into a new database first (recommended)
sudo mysql -e "CREATE DATABASE shop_restore"
sudo mysql shop_restore < /tmp/shop_2026-11-12_0200UTC.sql

# or over the original database
sudo mysql shop < /tmp/shop_2026-11-12_0200UTC.sql

PostgreSQL

sudo -u postgres createdb shop_restore
sudo -u postgres pg_restore --no-owner -d shop_restore /tmp/shop_2026-11-12_0200UTC.pgdump

MongoDB

mongorestore --archive=/tmp/shop_2026-11-12_0200UTC.archive --nsFrom='shop.*' --nsTo='shop_restore.*'

SQLite

The decrypted file is the database. Stop the app, replace the file, start the app:

pm2 stop myapp
cp /path/to/app.db /path/to/app.db.before-restore
cp /tmp/app.db_2026-11-12_0200UTC.sqlite /path/to/app.db
pm2 start myapp

Folders

mkdir /tmp/restore && tar -xf /tmp/uploads_2026-11-12_0200UTC.tar -C /tmp/restore
# check the files, then copy what you need back into place

4. Clean up

Decrypted files are not encrypted. Delete them when you're done:

rm /tmp/*.fbk /tmp/shop_2026-11-12_0200UTC.sql

Test your restores

Once every few months, restore a recent backup into a test database and check that the data looks right. It's the only way to be sure your backups work when you really need them.