Sign in
GUIDE 12 / Operations

Can you get back to working?Understand backup and rollback.

Learn how application rollback differs from data restoration, how recovery points work, and why restore testing matters.

THE SHORT VERSION

An application rollback changes code; a restore changes data state.

The recovery point determines how much recent data may be missing.

A backup is useful when its restore process has been verified.

01 / Backup & recovery

Recovering code and recovering data are different decisions.

A release can fail because of application behavior, configuration or changed data. Returning to a previous image addresses only part of that picture. It may leave database migrations and records exactly as they are, which can make the previous version incompatible.

Imagine the shop’s new checkout release displays the wrong shipping message. Reverting the application might be enough. If an operation removed customer records, an older application image would not recreate them. Identify what changed before choosing the recovery action.

02 / Backup & recovery

A recovery point has a time attached to it.

A backup represents information recoverable from a particular point or period. Restoring an earlier state can leave later legitimate changes absent. Some database systems can combine a base backup with retained change logs to recover to a selected point in time, subject to the available recovery chain.

The timeline below separates a code release from order data. Compare rolling back the application with restoring a saved data point. The numbers are illustrative, but the trade-off is real: “go back” needs a target and a clear account of what happens to changes made after it.

Reference: PostgreSQL: point-in-time recovery
INTERACTIVE EXPLAINERChoose what you are taking back in time.
Choose what you are taking back in time.
09:00Backup
10:00Release v2
11:00Current
APPLICATIONVersion 2
ORDER DATA112 orders

At 11:00, version 2 runs with 112 orders. The 09:00 backup contains 100. This is a fictional, simplified timeline.

09:00Backup
10:00Release v2
11:00Current
APPLICATIONVersion 1
ORDER DATA112 orders

The application returns to version 1. The 112 current orders remain. This assumes version 1 is compatible with the current data schema.

09:00Backup
10:00Release v2
11:00Current
APPLICATIONVersion 2
ORDER DATA100 orders

Data returns to the 09:00 backup, containing 100 orders. The 12 later orders are absent. The application version stays unchanged in this model.

Conceptual example · explore each state
03 / Backup & recovery

Describe acceptable loss and acceptable downtime.

A recovery point objective, or RPO, expresses the amount of data loss an organization is prepared to tolerate, usually as a time window. A recovery time objective, or RTO, expresses how quickly service should be restored. These are goals used to shape and test the plan, not properties guaranteed by a backup label.

For the shop, losing a day of orders and losing a day of analytics may have very different consequences. List the important data classes separately. Then time a realistic restore, including provisioning, importing, checking permissions and reopening the service—not just downloading the backup file.

Describe acceptable loss and acceptable downtime.
ConceptQuestionExample planning statement
Recovery pointHow much recent change can be lost?Orders need a short recoverable gap
Recovery timeHow long can service be unavailable?Checkout has a defined restoration target
RetentionHow far back must we recover?Keep enough history to detect late mistakes
Restore testDoes the plan actually work?Rebuild and verify in isolation
04 / Backup & recovery

Choose a method that understands the data.

Database backup methods have consistency and restoration requirements. A logical export captures data in a form the database can restore; physical and log-based approaches have different constraints. Copying live database files arbitrarily is not interchangeable with an engine-supported backup procedure.

Keep the recovery instructions with the backup inventory: engine version, encryption keys, access requirements and restore order. Ensure that a problem affecting production credentials or storage cannot casually destroy every recovery copy. The backup destination belongs in the architecture diagram too.

Reference: PostgreSQL: logical dumps and restoration
05 / Backup & recovery

Prove recovery before an incident asks you to.

Restore into an isolated environment and inspect meaningful outcomes. Can the application open an order? Are uploaded documents present? Do permissions and external integrations behave as expected? Disable real notifications and payments in the test environment so the exercise does not affect customers.

Record what the test restored, how long it took and any missing dependencies. Update the procedure after application or storage changes. A successful scheduled backup is useful evidence, but a successful, checked restoration is much closer to the outcome you need during an incident.

CLEAR UP THE DETAILS

Common questions.

Is a replica enough instead of backups?

No. A replica can also receive unwanted changes. Recovery usually needs retained states independent of the current live data.

Can I always roll back to an older container image?

Only if the older application remains compatible with current configuration and data. Review migrations and dependencies first.

Is a server snapshot sufficient?

It depends on consistency, coverage and restoration requirements. Verify the snapshot method against the database and application, then test recovery.

WHERE DOCKOCK FITS

Connect the concept to your work.

DOCKOCK keeps recovery connected to your infrastructure and application changes, so you can review the service, its data and the intended recovery action together.

Explore backup & recovery in DOCKOCK

Keep learning from the source.

Further reading from the teams and documentation behind these technologies.

PostgreSQL: point-in-time recoveryPostgreSQL: logical dumps and restoration
CONTINUE EXPLORING

What is your application telling you?

Turn operational signals into a clearer explanation of what happened.

Read the next guide