dokku / dokku-redis

a redis plugin for dokku
MIT License
256 stars 39 forks source link

When using backup and restore, if docker images don't exist on the new server, the "dokku ps:rebuild --all" command will fail #171

Open xrd opened 2 years ago

xrd commented 2 years ago

Description of problem

I followed the backup and restore options to move my dokku installation to a new server. When I attempted to dokku rebuild:all it failed because the docker images are not yet on the new server.

How reproducible

I only tried once, but I believe this is something that will happen with every new server.

Steps to Reproduce

  1. create a backup (https://dokku.com/docs/advanced-usage/backup-recovery/#creating-a-backup)
  2. create a new server
  3. restore the backup (https://dokku.com/docs/advanced-usage/backup-recovery/#restoring-a-backup)

Actual Results

You cannot rebuild anything that relies on a database since those images aren't there and are not pulled automatically.

Error response from daemon: could not get container for dokku.postgres.hasura-db: No such container: dokku.postgres.hasura-db

For example, database containers won't reboot, you need to pull them manually.

dokku postgres:restart hasura-db
 !     Service is already stopped
=====> Starting container
       Missing image postgres:11.6 for hasura-db
-----> Please call dokku ps:restart on all linked apps

dokku report APP_NAME output

N/A, this is for all apps.

How (deb/make/rpm) and where (AWS, VirtualBox, physical, etc.) was Dokku installed?

Ubuntu 20.4 LTS

josegonzalez commented 2 years ago

Moved to a datastore plugin as the fix is to have the datastores try and start before the apps start and bail appropriately there.

iandees commented 2 years ago

I ran into this after having to delete all my images during a Docker update (ran into this problem with aufs). Pulling the redis or postgres image doesn't seem to help.