Skip to main content
Jasonisnthappy provides built-in backup and restore capabilities with atomic operations and verification.

Creating backups

Basic backup

Create a backup of your database.
Backups are created atomically - the backup file is written to a temporary location and renamed only when complete.

Backup process

What happens during a backup:
Backups include a consistent snapshot of your data at the time the backup started.

Backup strategies

Manual backups

Create backups on demand.

Scheduled backups

Automate backups with a background thread.

Incremental backups

For frequent backups, copy only the WAL file.
Incremental backups require careful WAL management. For simplicity, prefer full backups.

Verifying backups

Verify backup integrity

Check that a backup file is valid.

Test backup restoration

Periodically test that backups can be restored.

Restoring from backup

Full restore

Restore a database from a backup file.
Important: Always remove the WAL file when restoring from a backup, or open the database to checkpoint it before use.

Partial restore

Restore specific collections from a backup.

Backup best practices

Storage location

Store backups separately from your database:

Backup retention

Keep multiple backup generations.

Backup naming

Use descriptive, timestamped names:

Backup automation example

Complete backup system with rotation.

Disaster recovery

Recovery checklist

Point-in-time recovery

Recover to a specific point in time using WAL.
Point-in-time recovery requires saving WAL files separately. For most use cases, regular full backups are sufficient.

Performance impact

Backup performance

Backup speed depends on database size: Times are approximate on SSD
Minimize impact on production:
  • Schedule backups during low-traffic periods
  • Use read-only replica for backups (if available)
  • Monitor backup duration and adjust frequency

Next steps

Performance

Optimize database performance

CRUD operations

Operations that affect backup content

Indexes

Indexes are included in backups

Schema validation

Schemas are included in backups