Comments (10)
What do you mean, "it loops"?
from dokku-postgres.
its write (or output) the file again, and again, and again, its never exit. an infinite loop.
Try the command, u will see.
from dokku-postgres.
Seems to work fine here. Latest install of the plugin. What happens if you just export without importing?
root@dokku:/var/lib/dokku/services/postgres# dokku postgres:create derp
Waiting for container to be ready
Creating container database
Securing connection to database
=====> Postgres container created: derp
DSN: postgres://postgres:2ce17d116f27ebf8c740db9aabac672a@dokku-postgres-derp:5432/derp
root@dokku:/var/lib/dokku/services/postgres# dokku postgres:export derp > derp.db
root@dokku:/var/lib/dokku/services/postgres# cat derp.db
PGDMP
4tderp9.5.29.5.20ENCODINENCODINGSET client_encoding = 'UTF8';
false00
STDSTRINGS
STDSTRINGS(SET standard_conforming_strings = 'on';
false126216384derDATABASEtCREATE DATABASE derp WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'en_US.utf8' LC_CTYPE = 'en_US.utf8';
DROP DATABASE derp;
postgresfalse26152200publicSCHEMACREATE SCHEMA public;
DROP SCHEMA public;
SCHEMA publicCOMMENT6COMMENT ON SCHEMA public IS 'standard public schema';
postgresfalse6307912361plpgsql EXTENSION?CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
DROP EXTENSION plpgsql;
false00EXTENSION plpgsqlCOMMENT@COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
false1
from dokku-postgres.
its happen with the dokku CLI from a local machine.
now you have created derp on a distant server,
root@dokku:/var/lib/dokku/services/postgres# dokku postgres:create derp
try an export with the cli (contrib/dokku_client.sh), like that :
local@local:/path/to/your/git/remoted/project/# dokku postgres:export derp > derp.db
I notice the goal : make an easy command to synchronize local DB from production DB, like the heroku pg:pull
currently i need those 3 lines to get work:
dropdb derp -U postgres --if-exists
createdb derp -U postgres
ssh root@[myserver] "dokku postgres:export derp" | pg_restore -U postgres -d derp
from dokku-postgres.
Works using the official remote client:
jose@mactaku:~/src/side-projects/playground git:master $ dokku postgres:export derp > derp.db
jose@mactaku:~/src/side-projects/playground git:master $ cat derp.db
PGDMP
'tderp9.5.29.5.20ENCODINENCODINGSET client_encoding = 'UTF8';
false00
STDSTRINGS
STDSTRINGS(SET standard_conforming_strings = 'on';
false126216384derDATABASEtCREATE DATABASE derp WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'en_US.utf8' LC_CTYPE = 'en_US.utf8';
DROP DATABASE derp;
postgresfalse26152200publicSCHEMACREATE SCHEMA public;
DROP SCHEMA public;
SCHEMA publicCOMMENT6COMMENT ON SCHEMA public IS 'standard public schema';
postgresfalse6307912361plpgsql EXTENSION?CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
DROP EXTENSION plpgsql;
false00EXTENSION plpgsqlCOMMENT@COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
false1
from dokku-postgres.
Using the root user:
jose@mactaku:~/src/side-projects/playground git:master $ ssh [email protected] "dokku postgres:export derp"
PGDMP
-tderp9.5.29.5.20ENCODINENCODINGSET client_encoding = 'UTF8';
false00
STDSTRINGS
STDSTRINGS(SET standard_conforming_strings = 'on';
false126216384derDATABASEtCREATE DATABASE derp WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'en_US.utf8' LC_CTYPE = 'en_US.utf8';
DROP DATABASE derp;
postgresfalse26152200publicSCHEMACREATE SCHEMA public;
DROP SCHEMA public;
SCHEMA publicCOMMENT6COMMENT ON SCHEMA public IS 'standard public schema';
postgresfalse6307912361plpgsql EXTENSION?CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
DROP EXTENSION plpgsql;
false00EXTENSION plpgsqlCOMMENT@COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
false1
Using the dokku user:
jose@mactaku:~/src/side-projects/playground git:master $ ssh [email protected] "postgres:export derp"
PGDMP
7tderp9.5.29.5.20ENCODINENCODINGSET client_encoding = 'UTF8';
false00
STDSTRINGS
STDSTRINGS(SET standard_conforming_strings = 'on';
false126216384derDATABASEtCREATE DATABASE derp WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'en_US.utf8' LC_CTYPE = 'en_US.utf8';
DROP DATABASE derp;
postgresfalse26152200publicSCHEMACREATE SCHEMA public;
DROP SCHEMA public;
SCHEMA publicCOMMENT6COMMENT ON SCHEMA public IS 'standard public schema';
postgresfalse6307912361plpgsql EXTENSION?CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
DROP EXTENSION plpgsql;
false00EXTENSION plpgsqlCOMMENT@COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
false1jose@mactaku:~/src/side-projects/playground git:master $
from dokku-postgres.
Ok it works for you :)
For me the second works (root and dokku user), but the first with the official RC make an infinite loop.
`➜ TEST git:(master) ✗
dokku postgres:export derp > derp.db`
...
...
...
...
... never ending ...
from dokku-postgres.
What version of the plugin do you have? Can you do the following on your server:
cd /var/lib/dokku/plugins/available/postgres
git show
And paste the output?
from dokku-postgres.
cd /var/lib/dokku/services/postgres
fatal: Not a git repository (or any of the parent directories): .git
but i clone the plugin 1 day ago
but for my problem, my bad, i just incredibly slow, i think, it's just curious for a fresh DB the dump file is over 300.000.000 lines. I continue to investigate
from dokku-postgres.
Sorry, wrong directory. You probably have the correct version though.
Regarding speed, it is probably buffering the output in memory and then spitting it out.
from dokku-postgres.
Related Issues (20)
- Connecting to the db remotely HOT 10
- Database not created on Ubuntu 20.04 ARM64 HOT 7
- Docker hostname is invalid HOT 13
- Postgres is constantly in restarting state HOT 6
- The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested HOT 4
- postgres:upgrade should not allow major version upgrade attempts HOT 1
- Uploads to Minio fail with 'connection closed' error HOT 6
- no JDBC url provided
- Read-only file system on postgres:create HOT 8
- Cannot export databases with hyphens HOT 7
- dokku postgres:export error HOT 6
- Table ownership all changed to "postgres" after restoring from dump HOT 2
- Question: How to encrypt traffic with SSL (self signed ok) HOT 1
- Cannot set data_directory with new postgres service HOT 3
- dokku-postgres fails to start on a fresh dokku installation using docker ( HOT 4
- pgvector for Vector Similarity Search HOT 2
- Bump to postgres 16 HOT 1
- Question: Best Practices for Configuring Health Checks on DB Backups HOT 3
- `destroy` and `unlink` disagree on whether or not a database is linked to an app HOT 2
- Postgresql configuration HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dokku-postgres.