New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database dump contains no data when using "gitea dump -d postgres" #5659

Closed
mpraeger opened this Issue Jan 7, 2019 · 9 comments

Comments

5 participants
@mpraeger
Copy link

mpraeger commented Jan 7, 2019

  • Gitea version (or commit ref): 1.6.3, 17.0-rc2
  • Git version: 2.20.1
  • Operating system: FreeBSD 11.2
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

I'm trying to migrate from MySQL to PostgreSQL and was advised (see #5651) that using gitea dump -d postgres might work. While this does indeed produce an SQL dump the inserts do not contain any data (see dump.txt ).

I've used the following command:

gitea dump -c /usr/local/etc/gitea/conf/app.ini -d postgres

If there's anything missing or further information is required I'd be more than happy to provide it.

Thanks!

Screenshots

@typeless

This comment has been minimized.

Copy link
Contributor

typeless commented Jan 8, 2019

Maybe you can try to add '-v' to get more details.

Edit: Looking at the log message and https://github.com/go-gitea/gitea/blob/master/cmd/dump.go might give some clues.

@mpraeger

This comment has been minimized.

Copy link

mpraeger commented Jan 8, 2019

Absolutely: gitea_dump_verbose.txt

Unfortunately gitea does not seem to be logging much for the database dump.

@typeless

This comment has been minimized.

Copy link
Contributor

typeless commented Jan 8, 2019

@mpraeger Do you have the log file xorm.log in the generated zip file?

@mpraeger

This comment has been minimized.

Copy link

mpraeger commented Jan 8, 2019

@typeless Had to create a new dump, but sure: xorm.log

@mpraeger

This comment has been minimized.

Copy link

mpraeger commented Jan 8, 2019

I've just tested dumping to sqlite3, that produced a proper dump.

@mpraeger

This comment has been minimized.

Copy link

mpraeger commented Jan 8, 2019

Alright so going from MySQL to sqlite3 and then issuing gitea dump -d postgres produces a proper dump.

@gzsombor

This comment has been minimized.

Copy link
Contributor

gzsombor commented Jan 9, 2019

I accidentally found the same issue, and figured out, how to fix : go-xorm/xorm#1186

@lunny

This comment has been minimized.

Copy link
Member

lunny commented Jan 9, 2019

@gzsombor merged in that xorm's PR, please send a vendor update PR on gitea.

gzsombor added a commit to gzsombor/gitea that referenced this issue Jan 9, 2019

techknowlogick added a commit that referenced this issue Jan 9, 2019

@techknowlogick

This comment has been minimized.

Copy link
Member

techknowlogick commented Jan 10, 2019

Closed with #5680

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment