Backup issue for Gitea

Not able to take backup of Gitea.
getting error “Failed to connect to database: Unknown database type:”
Anyone have idea how to resolve this issue.

I back it up manually: by making copy of all its files and making pg db backup by pg_dump.

Think you could add a little color with regard to which files you back-up? I’m thinking probably the folder containing the git repos as well as the config, in addition to a db dump (in your case via Postgre).

I am using SQLite DB

1.dump db (I use postgresql, so pg_dump)
2.copy git repos
3.copy /var/lib/gitea


@elfuego Thanks for the step, for the step 3 where is /var/lib/gitea in Windows machine?

@vbose1 Have you tried full path on your command like gitea dump -c C:/Gitea/gitea/custom/data/to?

I had the same error, but I solved by just typing gitea dump (my app.ini in the default directory).

Have no idea, but this is custom data path.

not working getting same error
Failed to connect to database: Unknown database type:

Then, have you tried elfuego’s suggestion?

  1. Dump database by gitea dump db /custom/data/to/app.ini
  2. Copy git repositories
  3. Copy /var/lib/gitea (I am not sure where is in Windows by the way)

For my Windows machine, the step 1 and 2 looks like working as same as gitea dump.

I’m having the same issue as vbose1 on Raspbian.

Trying elfuego and cloudlakecho’s suggestion gitea dump db /custom/data/to/app.ini worked, git repos all cloned. I don’t have /var/lib/gitea though…

it’s been a while since I configured Gitea so I’m a little rusty…

@treasuretron I suggest check your configuration. One of my causes was incorrect folder location…Regarding back up command, gitea dump should work as well.

thanks, yeah gitea dump seems to work!