You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
tries to restore "$archivedir/custom" directory by renaming the old $GOGS_CUSTOM to $GOGS_CUSTOM.bak, then moving the archive/custom dir to $GOGS_CUSTOM.
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)
The "gogs backup" explicitly excluded the data directory from the backup. It seems the simplest fix would be that after the restore of $GOGS_CUSTOM, if $GOGS_CUSTOM.bak/data exists, then move it back to $GOGS_CUSTOM.
Gogs version
v0.13.0
Git version
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:
But, after this, I end up with:
It appears to be:
gogs/Dockerfile
Line 28 in fa84482
gogs/internal/conf/computed.go
Line 80 in fa84482
gogs/internal/cmd/restore.go
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:
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
The text was updated successfully, but these errors were encountered: