Open
Description
Gogs version
v0.13.0
Git version
- Server: n/a
- Client: n/a
Operating system
Docker v0.13.0
Database
sqlite3
Describe the bug
I've had some trouble migrating from a non-Docker installation of gogs to a dockerized version. I dumped the old gogs version 0.11.91.0811, and then tried to load into the docker container with:
source /app/gogs/docker/s6/gogs/setup # creates log symlinks
gosu $USER mkdir /data/tmp # same vol as /data so rename works
gosu $USER /app/gogs/gogs restore --verbose --from /restore/gogs-backup.zip --config /restore/app.ini --tempdir /data/tmp
But, after this, I end up with:
/data/git/...
/data/gogs/ (empty)
/data/gogs.bak/data/gogs.db
/data/gogs.bak/conf
/data/gogs.bak/log/...
It appears to be:
Line 28 in fa84482
gogs/internal/conf/computed.go
Line 80 in fa84482
- conf.CustomDir() is "/data/gogs"
Line 124 in fa84482
That has renamed /data/gogs/data/gogs.db to /data/gogs.bak/data/gogs.db.
To reproduce
It seems what is required:
- gogs restore in Docker (where GOGS_CUSTOM=/data/gogs)
- backup archive contains a "custom" dir (v0.11.91.0811 backup fails if there is no custom dir)
- database.type = sqlite3; database.path = data/gogs.db
Expected behavior
database should be in correct place after restore.
Since I am starting with a fresh /data directory, my workaround is to mv /data/gogs.bak/* /data/gogs/.
Additional context
No response
Code of Conduct
- I agree to follow this project's Code of Conduct