Skip to main content

Restoring database backups

This section covers how you can copy the contents of your database, as well as restore it to a snapshot of what it looked like at a specific date and time.

Written by Sofia Maconi

The actions described below can potentially rewrite all the contents of your database. Be careful when using these features, and double-check that your settings are correct before you go ahead. Copying and restoring large databases can take some time to finish.

Bubble keeps a continuous backup of both of your app's databases, development and live. Every change is recorded as it happens, so if data is deleted or changed by mistake, you can restore the database to how it looked at an earlier point in time, down to the second.

This article explains how restoring works, what to think about before you restore, and how to do it.

How restoring works

When you restore, you pick a database, a data type, and a point in time. Bubble then returns that data to how it looked just before the time you chose. Every change made at that exact time or later is undone, including records that were created, changed, or deleted.

Property

What it does

Database to restore

Choose whether to restore your development or live database

Data type to restore

Choose which data type to restore

Restore to

The date and time to go back to. Your data returns to how it looked just before this time.

Type to confirm

A confirmation step, so you don't restore by accident

Restoring only affects data. Your data types, fields, and option sets are part of your app's structure, and they aren't changed by a restore.

How far back you can go

How far back you can restore depends on your app's plan. The Restore database popup shows how many days your plan lets you go back.

If you've deleted your database change history, you can only restore to points after the deletion. See Delete all database change history for details.

Before you restore

Restoring can't be undone in the usual way, so it's worth taking a moment to prepare:

What to check

Why it matters

The time of the mistake

Pick a time just before the unwanted change happened. Anything after it, including changes you want to keep, is undone too.

Which database you're restoring

The live database holds your users' data. Make sure you've selected the right one.

Related data types

If you restore only one data type, its records may no longer match records in other data types they're linked to.

Changes you want to keep

Consider exporting the current data as a CSV or JSON file first, so you have a copy of the latest changes.

Large databases can take a long time to restore.

Restore your database

1. Open the App data section

In the editor, go to the Data tab and open the App data section.

2. Open the restore options

Click Copy and restore database in the upper right corner, then select Restore database.

The Restore database option in the Copy and restore database dropdown

3. Choose the database

The Restore database popup

Under Database to restore, select Development or Live.

4. Choose the data type

Under Data type to restore, select the data type you want to restore.

5. Set the time to restore to

Under Restore to, enter the date and time you want to go back to. Your data returns to how it looked just before this time.

To start from the current moment and adjust from there, click Use current time.

6. Confirm the restore

Type the confirmation text shown under Type to confirm. It's Restore Development for the development database, or Restore Live for the live database.

7. Restore

Click Restore database. Depending on the size of your database, this can take a while.

FAQ: Restoring your database

Does restoring one database affect the other?

No. You choose which database to restore, and the other one isn't changed.

Why can't I go back as far as I'd like?

How far back you can restore depends on your app's plan. If you've deleted your database change history, you can also only restore to points after the deletion.

Can I restore a single record?

No. Restoring affects all records of the data type you select. To recover a single record, you can restore to a test copy of the data, for example by copying it to development, and then move the record back manually.

Did this answer your question?