Database backup

    What is a database backup?

    SHORT ANSWER

    A database backup is a saved copy of your data that you can restore if something goes wrong: a bad update, an accidental delete, a hacked account or a provider outage. A backup you have never restored is only a hope, so a good backup is one you have tested.

    ON THIS PAGE

    What it means

    Your database holds everything your users have created. If it is lost or damaged and there is no copy, that data is gone for good.

    Backups are taken on a schedule, or before risky changes. 'Restoring' means loading that saved copy back in place of the broken one.

    Why it matters for vibe-coded apps

    AI tools are happy to run commands that rewrite or reset your data, and the free tier of many hosts includes no backups at all.

    IF THIS IS WRONG IN YOUR APP
    • One wrong migration or 'reset the database' command can wipe real customer data.
    • A hacked or deleted account is much harder to recover from without a copy.
    • You may only find out your plan has no backups after you need one.

    Example

    You are about to let your AI tool change the shape of a live table.

    ✕ RISKYStraight into production with no safety net
    -- Run directly against live data
    alter table orders drop column notes;
    ✓ SAFERSave a copy first, and know how to put it back
    # Before the change
    pg_dump "$DATABASE_URL" -Fc -f backup-2026-10-14.dump
    
    # If something goes wrong
    pg_restore --clean -d "$DATABASE_URL" backup-2026-10-14.dump

    Keep the copy somewhere other than the database provider, such as private cloud storage.

    How to check if your app has this problem

    1. 1Find out what backups your database plan includes and how long they are kept.
    2. 2Look for the last successful backup date in your provider dashboard.
    3. 3Ask yourself: if the database vanished now, how much would you lose?

    The quicker way: LetMeCheck tests for this automatically, from the outside, the way an attacker would.

    Run a free scan →

    How to fix it

    1. 1Turn on automatic daily backups, or upgrade to a plan that has them.
    2. 2Take a manual backup before every migration or big change.
    3. 3Store an extra copy outside your database provider.
    4. 4Try a restore into a test project at least once, so you know it works.
    FIX PROMPT · PASTE INTO YOUR AI TOOL

    Add a backup step to my project. Write a script that dumps my Postgres database with pg_dump using the DATABASE_URL environment variable, saves it with today's date in the filename, and explain how to restore it with pg_restore. Also add a note to my README saying to run it before every migration. Don't change anything else.

    Check if your app has this problem

    Paste your website and we'll check for database backup issues and other common issues in AI-built apps. Free, about a minute, and nothing on your site is changed.

    Last updated