Skip to content
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
2 of 7 tasks
mpraeger opened this issue Jan 7, 2019 · 9 comments
Closed
2 of 7 tasks

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

mpraeger opened this issue Jan 7, 2019 · 9 comments

Comments

@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
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
Copy link
Author

mpraeger commented Jan 8, 2019

Absolutely: gitea_dump_verbose.txt

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

@typeless
Copy link
Contributor

typeless commented Jan 8, 2019

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

@mpraeger
Copy link
Author

mpraeger commented Jan 8, 2019

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

@mpraeger
Copy link
Author

mpraeger commented Jan 8, 2019

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

@mpraeger
Copy link
Author

mpraeger commented Jan 8, 2019

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

@gzsombor
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
Copy link
Member

lunny commented Jan 9, 2019

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

@techknowlogick
Copy link
Member

Closed with #5680

gzsombor added a commit to gzsombor/gitea that referenced this issue Jan 10, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants