restoring postgres snapshot fails: Restore volume size must be at least 10GB

In the dashboard I go to the volumes of my postgres app (one shared-1x-cpu@256MB) and find a list of snapshots with a button How to use?. It says:

To create a Postgres with this snapshot
fly postgres create --snapshot-id vs_pOzovae2A8NquqJemQ3gD

But when I run this and choose the options in the dialog, it fails:

 ? Choose an app name (leave blank to generate one): onsappelle-ror-db-restored
automatically selected personal organization: xxx
Some regions require a Launch plan or higher (bom, fra).
See https://fly.io/plans to set up a plan.

? Select region: Paris, France (cdg)
? Select configuration: Development - Single node, 1x shared CPU, 256MB RAM, 1GB disk
? Scale single node pg to zero after one hour? No
Creating postgres cluster in organization personal
Creating app...
Setting secrets on app onsappelle-ror-db-restored...
Restoring 1 of 1 machines with image flyio/postgres-flex:15.3@sha256:44b698752cf113110f2fa72443d7fe452b48228aafbb0d93045ef1e3282360a6
Error: failed to create volume: failed to create volume: Restore volume size must be at least 10GB (Request ID: 01HND4GR6QGEM7HD4MDBKYQ3CW-cdg)

What does this mean? Is this due to the limitations of the hobby plan?

Hi @AndreasK ! Would be possible the snapshot you are trying to use to create a new Postgres was taken on a 10GB volume?

If that’s the case, you’d need to select at least a 10GB disk in the new postgres settings.

@aschiavo , yes, the snapshot was taken on a 10GB volume. Where are the settings for a new postgres?

I was following these instructions, which don’t say anything about postgres settings:

Hey @AndreasK , if the snapshot was taken on a 10GB volume, that may be the problem.

I can see in your initial post, the settings for the new Postgres are

Select configuration: Development - Single node, 1x shared CPU, 256MB RAM, 1GB disk

Based on that, looks like you are trying to restore a 10GB snapshot in a 1GB volume.

For restoring your 10GB snapshot:
When running command fly postgres create --snapshot-id vs_pOzovae2A8NquqJemQ3gD , on step Select configuration, you can use the arrows and select Specify custom configuration.
There you can select the same settings as Development (Single node, 1x shared CPU, 256MB RAM) but in the Volume size step select at least 10GB.

And you are right, the docs do not mention the volume size. I’ll work on getting that fixed.

Please let me know if the steps above resolve your issue.

Thanks for the quick answer! I chose a custom configuration, and I’m no longer getting that error.

$ fly postgres create --snapshot-id vs_pOzovae2A8NquqJemQ3gD
? Choose an app name (leave blank to generate one): onsappelle-db
automatically selected personal organization: Andreas
Some regions require a Launch plan or higher (bom, fra).
See https://fly.io/plans to set up a plan.

? Select region: Paris, France (cdg)
? Select configuration: Specify custom configuration
? Initial cluster size - Specify at least 3 for HA 1
? Select VM size: shared-cpu-1x - CPU Kind: Shared, vCPUs: 1 Memory: 256MB
? Volume size 10
Creating postgres cluster in organization personal
Creating postgres cluster in organization personal
Creating app...
Setting secrets on app onsappelle-db...
Restoring 1 of 1 machines with image flyio/postgres-flex:15.3@sha256:44b698752cf113110f2fa72443d7fe452b48228aafbb0d93045ef1e3282360a6
Waiting for machine to start...
Machine e78499dc615068 is created
==> Monitoring health checks
  Waiting for e78499dc615068 to become healthy (started, 3/3)

Postgres cluster onsappelle-db created
...
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.