# \`fly pg backup create\` always fails

**URL:** <https://community.fly.io/t/fly-pg-backup-create-always-fails/23556>\
**Category:** Questions / Help\
**Tags:** postgres, duplicated, login-only\
**Created:** [January 20, 2025, 7:25am UTC](https://community.fly.io/t/fly-pg-backup-create-always-fails/23556 "2025-01-20T07:25:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jechol](https://avatars.discourse-cdn.com/v4/letter/j/ac8455/32.png) [@jechol](https://community.fly.io/u/jechol)\
**Post date:** [January 20, 2025, 7:25am UTC](https://community.fly.io/t/fly-pg-backup-create-always-fails/23556/1 "2025-01-20T07:25:34Z")

</div>

I tried running the following command to create a backup for my [Fly.io](http://Fly.io) PostgreSQL database:

```auto
❯ fly pg backup create -a <my-pg-appname>

```

However, it fails with the following error message:

```auto
Error: failed to exec on VM <vmid>: deadline_exceeded: Post "http://unix/v1/exec": context deadline exceeded (Client.Timeout exceeded while awaiting headers) (Request ID: <reqid>)

```

Afterward, when I run fly pg backup list, the status shows as DONE, but it still feels suspicious and unreliable.

---

<div class="post-metadata">

**Author:** ![shaun](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@shaun](https://community.fly.io/u/shaun)\
**Post date:** [January 23, 2025, 3:34am UTC](https://community.fly.io/t/fly-pg-backup-create-always-fails/23556/3 "2025-01-23T03:34:33Z")

</div>

The issue is that the command that issues the backup is blocking and will eventually timeout. The backup should still work, but it’s not pretty. It should be a fairly easy fix, but prioritizing it has been tricky.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/fly1/original/3X/6/e/6e8955d00cb218e186ebbe3a6ab06fefdce15290.svg) [@system](https://community.fly.io/u/system)\
**Post date:** [January 30, 2025, 3:34am UTC](https://community.fly.io/t/fly-pg-backup-create-always-fails/23556/4 "2025-01-30T03:34:48Z")

</div>

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