Closed danjac closed 1 year ago
Your host data directories are not mounted into containers, and we don't support custom paths for managed services. If you want to do this:
dokku postgres:info $SERVICE
)the above is untested but should work. Please back up your existing data before continuing.
All that said, I don't think it's a great idea for us to add functionality allowing folks to customize the data directory otherwise, simply because of complexity of this sort of feature.
Hope that helps.
Symlinking worked, thanks. This might be a common requirement when needing to move data PostgreSQL in an existing application due to disk space issues, so would be good to document (as the standard approach of setting data_directory
won't work).
Pull requests welcome.
Description of problem
I have an existing copy PostgreSQL database directory under a volume
/mnt/volume-xxx
. The volume is mounted and is accessible. The data dir is/mnt/volume-xxx/postgres/data
. The data was created using PostgreSQL 14.8, so the service image should use the same version.I wish to create a new Dokku postgres service and set the
data_directory
to point to this directory (I would prefer to just create the new service and setdata_directory
inpostgresql.conf
, but this appears to be ignored on restarting the service):I then get a number of errors:
Not only does the data directory exist, but it has the correct ownership ("dokku:dokku").
Environment Information
dokku report APP_NAME
outputHow (deb/make) and where (AWS, VirtualBox, physical, etc.) was Dokku installed?:
Hetzner Cloud Ubuntu 22.04.2 LTS x86_64