Gitea: dump is skipping /etc/gitea/app.ini

Created on 11 Feb 2019  路  9Comments  路  Source: go-gitea/gitea

  • Gitea version (or commit ref): 1.7.1
  • Git version: 2.7.4
  • Operating system: Ubuntu Server 16.04 LTS
  • Database (use [x]):

    • [x] PostgreSQL

    • [ ] MySQL

    • [ ] MSSQL

    • [ ] SQLite

  • Can you reproduce the bug at https://try.gitea.io:

    • [ ] Yes (provide example URL)

    • [x] No

    • [ ] Not relevant

  • Log gist:

Description

I installed Gitea from binary using this Installation from binary doc. I am trying to use the dump command to take backup. But the dump command is skipping the app.ini in /etc/gitea where all of my configs are.

Steps to reproduct

  1. perform backup with following steps:
cd /home/git
sudo -u git /usr/local/bin/gitea dump -c /etc/gitea/app.ini
sudo mv gitea-dump-* /path/to/backup/gitea-dump.zip

  1. now extract the zip file
cd /path/to/backup/
sudo unzip gitea-dump.zip

which gives the following output:

Archive:  gitea-dump.zip
  inflating: gitea-repo.zip          
  inflating: gitea-db.sql            
   creating: log/
  inflating: log/gitea.log           
  inflating: log/xorm.log            
  inflating: log/serv.log            
   creating: log/hooks/
  inflating: log/hooks/update.log    
  inflating: log/hooks/pre-receive.log  
  inflating: log/hooks/post-receive.log  
  inflating: log/http.log            
   creating: custom/
   creating: custom/conf/
  inflating: custom/conf/app.ini     

check for the config in app.ini

cat custom/conf/app.ini

output

[security]
INTERNAL_TOKEN = xxxxxxxxxxxxxxxxxxx

all my configurations are in /etc/gitea/app.ini not in custom/conf/app.ini. Is it expected? Does anyone know how to solve this?

Thanks in advance!

kinbug

All 9 comments

When you run the dump command do you pass in the config? E.g.

gitea dump -c /etc/gitea/app.ini

@zeripath, yes I did.

@zeripath any update? or have you been able to reproduce it?

I haven't had a chance to look in to this. I guess I need some more information - what do you mean by skipping. Is it that Gitea dump isn't finding your db? Do you have a relative path as your db path? If so you must run dump from the same working directory that you normally run Gitea from.

@zeripath updated the issue with Steps to reproduce.

I am also having this issue with the same commands given by @fazlerabbi37 in the first message.

@zeripath do you need more informations ?

Thanks.

Looks like Gitea doesn't make an effort to include a configuration file specifically, so it only gets included if in the default location of custom/conf/. Will send a PR for that

Is there already a solution?

My current workaround is to add the custom configuration file /etc/gitea/app.ini with the command 'zip -r gitea-dump-...zip /etc/gitea/app.ini' in a script.

Kind regards,
K1LLUM1N471

Fix will be included in v1.9.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lunny picture lunny  路  3Comments

BRMateus2 picture BRMateus2  路  3Comments

adpande picture adpande  路  3Comments

cookiengineer picture cookiengineer  路  3Comments

jonasfranz picture jonasfranz  路  3Comments