How to back up to Neon Object Storage

Neon Object Storage is S3-compatible object storage built into every Neon project. To keep your backups there, create a bucket and a credential in Neon Console, then add the bucket to Databasus as a storage. Databasus uploads every backup of the databases that use this storage, whether they run on Neon or anywhere else.

All you need is a running Databasus. If you don't have one yet, follow the installation guide. The S3 compatibility page of the Neon documentation lists what it supports.

Step 1. Create a bucket in Neon

Open the project that will hold the backups in Neon Console. Prefer a different project than the databases you back up: deleting a project removes its buckets too. Click Object storage in the sidebar, then Create bucket and enter a name for the bucket. A new bucket is private, and it belongs to the current branch of the project.

Object storage page of a Neon project with a bucket and the Create bucket button

Step 2. Copy the storage credentials

Click Connect and open the Storage tab. With Parameters only selected, Neon shows the endpoint, the access key, the secret key and the region. If the block shows placeholders instead of keys, generate a credential first, as its first line asks. Then click Copy credentials.

Storage tab of the Neon Connect window with the endpoint, keys and region and the Copy credentials button

The block looks like this. It does not hold the bucket name, so remember the name from step 1.

AWS_ENDPOINT_URL_S3="https://br-<branch>.storage.c-9.us-east-2.aws.neon.tech"
AWS_ACCESS_KEY_ID="nak_live_..."
AWS_SECRET_ACCESS_KEY="..."
AWS_REGION="us-east-2"

Step 3. Add the storage to Databasus

Choose Neon Object Storage in Databasus

In Databasus, open Storages and click Add storage. Give the storage a name and choose Neon Object Storage in the type list. Databasus saves it as an ordinary S3 storage, so the storage list shows its type as S3.

Paste the credentials and type the bucket name

Click Paste from clipboard. Databasus reads the block you copied in Neon and fills in the endpoint, region, access key and secret key. The block stays in your browser: the keys leave it only when you test or save the storage. Type the bucket name into S3 Bucket yourself. You can also fill in every field by hand below the or enter the details manually divider.

Neon Object Storage form of Databasus with the pasted endpoint, region and keys and the typed bucket name

Test the connection and save

Click Test connection. When the test passes, click Save. Now choose this storage in the backup settings of any database. If the database itself runs on Neon, the Neon backup guide walks through the rest of the setup.