dump is skipping /etc/gitea/app.ini #2889

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

Originally created by @fazlerabbi37 on GitHub (Feb 11, 2019).

  • Gitea version (or commit ref): 1.7.1
  • Git version: 2.7.4
  • Operating system: Ubuntu Server 16.04 LTS
  • 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 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!

Originally created by @fazlerabbi37 on GitHub (Feb 11, 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.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](https://docs.gitea.io/en-us/install-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 ``` 2. 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! <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the type/bug label 2025-11-02 04:52:46 -06:00
Author
Owner

@zeripath commented on GitHub (Feb 11, 2019):

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

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

@zeripath commented on GitHub (Feb 11, 2019): When you run the dump command do you pass in the config? E.g. `gitea dump -c /etc/gitea/app.ini`
Author
Owner

@fazlerabbi37 commented on GitHub (Feb 11, 2019):

@zeripath, yes I did.

@fazlerabbi37 commented on GitHub (Feb 11, 2019): @zeripath, yes I did.
Author
Owner

@fazlerabbi37 commented on GitHub (Feb 17, 2019):

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

@fazlerabbi37 commented on GitHub (Feb 17, 2019): @zeripath any update? or have you been able to reproduce it?
Author
Owner

@zeripath commented on GitHub (Feb 19, 2019):

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 commented on GitHub (Feb 19, 2019): 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.
Author
Owner

@fazlerabbi37 commented on GitHub (Feb 19, 2019):

@zeripath updated the issue with Steps to reproduce.

@fazlerabbi37 commented on GitHub (Feb 19, 2019): @zeripath updated the issue with Steps to reproduce.
Author
Owner

@nicovince commented on GitHub (Mar 28, 2019):

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

@zeripath do you need more informations ?

Thanks.

@nicovince commented on GitHub (Mar 28, 2019): I am also having this issue with the same commands given by @fazlerabbi37 in the first message. @zeripath do you need more informations ? Thanks.
Author
Owner

@mrsdizzie commented on GitHub (Apr 5, 2019):

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

@mrsdizzie commented on GitHub (Apr 5, 2019): 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
Author
Owner

@K1LLUM1N471 commented on GitHub (May 24, 2019):

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

@K1LLUM1N471 commented on GitHub (May 24, 2019): 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
Author
Owner

@lafriks commented on GitHub (May 24, 2019):

Fix will be included in v1.9.0

@lafriks commented on GitHub (May 24, 2019): Fix will be included in v1.9.0
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2889