+
Skip to content

divio project pull db should resume downloads instead of failing. #231

@stuaxo

Description

@stuaxo

When the network at work is flakey divio project pull db will download a partial file.

It then fails with input file is too short.

It would be better if it could retry retry and resume downloading instead of failing like this.

It's annoying as when the proxy at work decides it's going to do this, I can't really do anything all day, and being ${BIG_CORPORATION} pinning down the error at this end is unlikely.

Here is an example, it downloads about 109k of the 202k it should do and then fails.

$ divio project pull db
 ===> Pulling database from global-component-library test server
 ---> Preparing download [4s]
 ---> Downloading database [0s]
 ---> Starting local database server
      Found orphan containers (global-component-library_rabbitmq_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
global-component-library_db_1 is up-to-date
      [0s]
 ---> Waiting for local database server [5s]
 ---> Removing local database [0s]
 ---> Importing database
      Enabling extension: hstore
tar: can't open '/app/data.tar.gz': No such file or directory
pg_restore: [archiver] input file is too short (read 0, expected 5)

      [2s]
Done [20s]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载