Skip to content

gitea dump -c failed to connect to database and can't create a backup file #6393

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

Closed
2 of 7 tasks
alsmnn opened this issue Mar 20, 2019 · 4 comments
Closed
2 of 7 tasks

Comments

@alsmnn
Copy link

alsmnn commented Mar 20, 2019

  • Gitea version (or commit ref): 1.6.1
  • Git version: 2.19.2-0120
  • Operating system: DSM (Synology)
  • 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 installed gitea via gitea-spk on a Synology and am running it with MariaDB 10. Everything works fine. Now I wanted to update to the latest gitea version. While performing a backup, I ran into the following issue.
Running ./gitea dump -c ./custom/conf/app.ini in the /var/packages/Gitea/target/gitea dir (this is the home folder of gitea on a Synology), gives the following error:

$ ./gitea dump -c ./custom/conf/app.ini
2019/03/20 11:44:27 [I] Log Mode: Console(Info)
2019/03/20 11:44:27 [I] XORM Log Mode: Console(Info)
2019/03/20 11:44:27 [I] Cache Service Enabled
2019/03/20 11:44:27 [I] Session Service Enabled
2019/03/20 11:44:27 [I] Gitea v1.6.1 built with: bindata, sqlite
Failed to connect to database: Unknown database type:

I am a total noob regarding Databases like MariaDB/MySQL/PostgreSQl and so on, so please bear with me. Is it safe to manually backup all files & repos, perform an installation of the new gitea version and copy back the config, etc?
Which files do I have to backup?

Thank and best regards,
@aljole

@lunny
Copy link
Member

lunny commented Mar 20, 2019

manually backup all files, repos and database also safe. see https://docs.gitea.io/en-us/backup-and-restore/

@alsmnn
Copy link
Author

alsmnn commented Mar 21, 2019

Thanks, update worked fine.
Can be closed now

@thomas-mc-work
Copy link
Contributor

I'm encountering the same issue. Manual backup is possible, but the feature itself seems to be broken. Shouldn't we either reopen this ticket or remove that feature?

@crobarcro
Copy link

I'm encountering the same issue with gitea 1.12.3

Gitea version 1.12.3 built with GNU Make 4.1, go1.14.6 : bindata, sqlite, sqlite_unlock_notify

when I try to backup using the comand documented on the web page linked above I get the following:

$ su git
git@ed-mh-pi01:/root$ gitea dump -R -c /etc/gitea/app.ini -f /home/git/gitea-dump.zip
2020/08/12 10:38:52 ...dules/setting/git.go:93:newGit() [I] Git Version: 2.20.1, Wire Protocol Version 2 Enabled
2020/08/12 10:38:52 ...dules/setting/log.go:233:newLogService() [I] Gitea v1.12.3 built with GNU Make 4.1, go1.14.6 : bindata, sqlite, sqlite_unlock_notify
2020/08/12 10:38:52 ...dules/setting/log.go:279:newLogService() [I] Gitea Log Mode: Console(Console:info)
2020/08/12 10:38:53 ...les/setting/cache.go:70:newCacheService() [I] Cache Service Enabled
2020/08/12 10:38:53 ...les/setting/cache.go:81:newCacheService() [I] Last Commit Cache Service Enabled
2020/08/12 10:38:53 ...s/setting/session.go:63:newSessionService() [I] Session Service Enabled
2020/08/12 10:38:53 main.go:111:main() [F] Failed to run app with [gitea dump -R -c /etc/gitea/app.ini -f /home/git/gitea-dump.zip]: Failed to connect to database: Unknown database type: 

I'm using a mariadb database. I recently migrated to a new server, the command worked fine on the old server. I think the issue should be reopened as it is not resolved.

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