Migration Assistance - Get expert help migrating your business workloads to Neon.
Docs/Features/Branching/Branch archiving

Branch archiving

Learn how Neon automatically archives inactive branches to cost-effective storage

Only enabled on the Free Plan

Automatic archiving of inactive branches is only enabled on the Free Plan. Branch archiving will be introduced on paid plans at a later date.

What you will learn:

  • How Neon archives inactive branches

  • How branches are unarchived

  • How to monitor branch archiving

To minimize storage costs, Neon automatically archives branches that are:

  • Older than 14 days.
  • Have not been accessed for the past 24 hours

Both conditions must be true for a branch to be archived. Additionally, these conditions apply:

  • A branch cannot be archived if it has an unarchived child branch.
  • A child branch must be archived before a parent branch can be archived.

note

If your Neon project was inactive for more than a week before the introduction of branch archiving on November 11, 2024, the thresholds mentioned above are not tracked until the next time you access branches in your project.

Unarchiving a branch

No action is required to unarchive a branch. It happens automatically.

Connecting to an archived branch, querying it, or performing some other action that accesses it will trigger the unarchive process. Connection times and query times may be slower while a branch is in the process of being unarchived.

note

When a branch is unarchived, its parent branches, all the way up to the root branch, are also unarchived.

The following actions will automatically unarchive a branch, transferring the branch's data back to regular Neon storage:

Identifying archived branches

Archived branches can be easily identified in the Neon Console. On the Branches page, archived branches are identified by an archive icon, as shown below:

the archive icon shown on a branch in the branches list page

If you select an archived branch on the Branches page to view its details, you can find out when the branch was archived:

the archive status shown on a branch in the branch detail page

Archive and unarchive operations can also be monitored in the Neon Console or using the Neon API. See Monitoring branch archiving.

About archive storage

For Neon projects created in AWS regions, inactive branches are archived in Amazon S3 storage. For Neon projects created in Azure regions, branches are archived in Azure Blob storage. For more information about how archive storage works in Neon, refer to Archive storage in our architecture documentation.

Is automatic branch archiving configurable?

Branch archiving is not configurable. Arching and unarchiving happen automatically, as described above.

Monitoring branch archiving

You can monitor branch archive and unarchive operations from the System operations tab on the Monitoring page in the Neon Console. Look for the following operations:

  • Timeline archive: The time when the branch archive operation was initiated
  • Timeline unarchive: The time when the branch unarchive operation was initiated

For related information, see System operations.

You can also monitor branch states using the Neon CLI or Neon API.

The Neon CLI branches list command shows a branch's Current State. Branch states include:

  • init - the branch is being created but is not available for querying.

  • ready - the branch is fully operational and ready for querying. Expect normal query response times.

  • archived - the branch is stored in cost-effective archive storage. Expect slow query response times.

    neon branches list --project-id green-hat-46829796
    ┌───────────────────────────┬──────┬─────────┬───────────────┬──────────────────────┐
     Id Name Default Current State Created At
    ├───────────────────────────┼──────┼─────────┼───────────────┼──────────────────────┤
     br-muddy-firefly-a7kzf0d4 main true ready 2024-10-30T14:59:57Z
    └───────────────────────────┴──────┴─────────┴───────────────┴──────────────────────┘

Need help?

Join our Discord Server to ask questions or see what others are doing with Neon. Users on paid plans can open a support ticket from the console. For more details, see Getting Support.

Last updated on

Was this page helpful?