From: Andy R. <ac...@gm...> - 2019-06-10 18:58:02
|
On Mon, Jun 10, 2019 at 7:56 AM Andy Ruhl <ac...@gm...> wrote: > > I'm trying to move an active Netdisco server to another server by > moving the database. > > When I try to load the database from an SQL dump, I get an error on > the users table like this: > > $ psql -f users.sql > psql:users.sql:22: ERROR: value too long for type character varying(50) > CONTEXT: COPY users, line 1, column username: "user1 > {CRYPT}$2a$04$eGQ68GFd.n9mSTUFFN2UOXl.9sSWJ4txFj4vKACumfRySTUFF > 2017-03-17 10:09:52...." > > I've tried a binary dump and restore as well with this error: > > $ pg_restore users.dump.bin > pg_restore: [archiver] unsupported version (1.13) in file header > > How do I get the users table moved over? I kept playing with it and I found something that worked: pg_dump -t users --column-inserts -h 192.168.1.3 > users.sql psql -f users.sql Hopefully this helps someone else. Andy |