Restore from backup causes install setup to show #8778

Closed
opened 2025-11-02 08:17:28 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @gcstang on GitHub (Apr 1, 2022).

Description

I had to migrate from CentOS and docker to RH and podman and all seemed to be working until recently.

Recently I tried to upgrade from v1.15.10 to v1.15.11 and everything went crazy.
Constant restart telling me the shared volume can't be read (I use docker-compose.yml)
Also tried using 1.15.10 with a prior backup, same issue.

- type: volume
source: gitea
target: /data

volumes:
gitea:
external: true

I found something that said to add :Z (also tried lowercase) and that seemed to help but then I ran into bind not allowed on 443, changed this to 3000 and got past that issue. Now when the initial page loads I get an Install screen and it looks like my proper values in app.ini however after pushing the button to continue I can no longer log into the application with my original credentials.

Please help, not sure what is wrong at this point.

Gitea Version

1.15.10

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Using Podman with a docker-compose.yml (changed to Podman in January prior used Docker)

Database

SQLite

Originally created by @gcstang on GitHub (Apr 1, 2022). ### Description I had to migrate from CentOS and docker to RH and podman and all seemed to be working until recently. Recently I tried to upgrade from v1.15.10 to v1.15.11 and everything went crazy. Constant restart telling me the shared volume can't be read (I use docker-compose.yml) Also tried using 1.15.10 with a prior backup, same issue. `- type: volume` ` source: gitea` ` target: /data` `volumes:` ` gitea:` ` external: true` I found something that said to add :Z (also tried lowercase) and that seemed to help but then I ran into bind not allowed on 443, changed this to 3000 and got past that issue. Now when the initial page loads I get an Install screen and it looks like my proper values in app.ini however after pushing the button to continue I can no longer log into the application with my original credentials. Please help, not sure what is wrong at this point. ### Gitea Version 1.15.10 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? Using Podman with a docker-compose.yml (changed to Podman in January prior used Docker) ### Database SQLite
GiteaMirror added the type/bug label 2025-11-02 08:17:28 -06:00
Author
Owner

@gcstang commented on GitHub (Apr 2, 2022):

This ended up being a podman configuration issue, changed my docker-compose.yml volume setup for gitea from

  • type: volume
    source: gitea
    target: /data

To (Z on above caused a new folder but this provides write access, without it in Podman shows as readonly volume)
gitea:/data:Z

I also perform backups like this and it seems to work without dump, used it for several months without issue (if it helps someone else)

Gitea is the name of my container

***** Backup *******

giteaVer=$(podman ps -a | grep gitea | awk '{ print $2 }' | sed 's/:/ /g' | awk '{ print $NF }')
podman stop gitea
podman run --rm --volumes-from gitea -v $(pwd):/backup busybox tar cvf /backup/dkr_gitea_data_"$giteaVer".tar /data
podman start gitea

****** Restore *****

podman volume create gitea
podman run --rm -v gitea:/data -v $(pwd):/backup busybox sh -c "rm -rf /data/* /data/..?* /data/.[!.]* ; tar -C / -xvf /backup/dkr_gitea_data_1.15.11.tar"
podman pull docker.io/gitea/gitea:1.15.11

Mount your volume to your container as you normally would and it just works.

@gcstang commented on GitHub (Apr 2, 2022): This ended up being a podman configuration issue, changed my docker-compose.yml volume setup for gitea from - type: volume source: gitea target: /data To (Z on above caused a new folder but this provides write access, without it in Podman shows as readonly volume) gitea:/data:Z I also perform backups like this and it seems to work without dump, used it for several months without issue (if it helps someone else) Gitea is the name of my container ***** Backup ******* `giteaVer=$(podman ps -a | grep gitea | awk '{ print $2 }' | sed 's/:/ /g' | awk '{ print $NF }')` `podman stop gitea` `podman run --rm --volumes-from gitea -v $(pwd):/backup busybox tar cvf /backup/dkr_gitea_data_"$giteaVer".tar /data` `podman start gitea` ****** Restore ***** `podman volume create gitea` `podman run --rm -v gitea:/data -v $(pwd):/backup busybox sh -c "rm -rf /data/* /data/..?* /data/.[!.]* ; tar -C / -xvf /backup/dkr_gitea_data_1.15.11.tar"` `podman pull docker.io/gitea/gitea:1.15.11` Mount your volume to your container as you normally would and it just works.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8778