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

Closed
opened 2025-11-02 04:45:27 -06:00 by GiteaMirror · 9 comments
Owner

Originally created by @mpraeger on GitHub (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

Originally created by @mpraeger on GitHub (Jan 7, 2019). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - 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 - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] 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](https://github.com/go-gitea/gitea/files/2734118/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 <!-- **If this issue involves the Web Interface, please include a screenshot** -->
Author
Owner

@typeless commented on GitHub (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.

@typeless commented on GitHub (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.
Author
Owner

@mpraeger commented on GitHub (Jan 8, 2019):

Absolutely: gitea_dump_verbose.txt

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

@mpraeger commented on GitHub (Jan 8, 2019): Absolutely: [gitea_dump_verbose.txt](https://github.com/go-gitea/gitea/files/2736348/gitea_dump_verbose.txt) Unfortunately gitea does not seem to be logging much for the database dump.
Author
Owner

@typeless commented on GitHub (Jan 8, 2019):

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

@typeless commented on GitHub (Jan 8, 2019): @mpraeger Do you have the log file `xorm.log` in the generated zip file?
Author
Owner

@mpraeger commented on GitHub (Jan 8, 2019):

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

@mpraeger commented on GitHub (Jan 8, 2019): @typeless Had to create a new dump, but sure: [xorm.log](https://github.com/go-gitea/gitea/files/2737299/xorm.txt)
Author
Owner

@mpraeger commented on GitHub (Jan 8, 2019):

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

@mpraeger commented on GitHub (Jan 8, 2019): I've just tested dumping to sqlite3, that produced a proper dump.
Author
Owner

@mpraeger commented on GitHub (Jan 8, 2019):

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

@mpraeger commented on GitHub (Jan 8, 2019): Alright so going from MySQL to sqlite3 and then issuing `gitea dump -d postgres` produces a proper dump.
Author
Owner

@gzsombor commented on GitHub (Jan 9, 2019):

I accidentally found the same issue, and figured out, how to fix : https://github.com/go-xorm/xorm/pull/1186

@gzsombor commented on GitHub (Jan 9, 2019): I accidentally found the same issue, and figured out, how to fix : https://github.com/go-xorm/xorm/pull/1186
Author
Owner

@lunny commented on GitHub (Jan 9, 2019):

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

@lunny commented on GitHub (Jan 9, 2019): @gzsombor merged in that xorm's PR, please send a vendor update PR on gitea.
Author
Owner

@techknowlogick commented on GitHub (Jan 10, 2019):

Closed with #5680

@techknowlogick commented on GitHub (Jan 10, 2019): Closed with #5680
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2718