Comments (2)
Reproduced with latest gogs:
Build docker:
git clone https://github.com/gogs/gogs
cd gogs
docker build --tag gogs7684:latest .
Startup gogs on data0:
docker run --rm \
--volume $PWD/data0:/data \
--volume $PWD/backup0:/backup \
--env RUN_CROND=true \
--env BACKUP_INTERVAL=1h \
gogs7684
Configure:
- Database type = SQLite3
- Application URL = $EXTERNALURL
- Admin Username = gogs
- Admin Password = gogs
- Install
- Create a repo for reference: "myrepo", Init this repo
Wait for backup at :00, or adjust cron crontab -u git -e
. Backup in backup0/gogs-backup-*.zip. Kill container.
Run new container, restore:
docker run \
--rm \
--volume $PWD/data1:/data \
--volume $PWD/backup0:/restore \
gogs7684 sh -c '
source /app/gogs/docker/s6/gogs/setup # symlinks
gosu $USER mkdir /data/tmp # mv across filesystems
gosu $USER /app/gogs/gogs restore --from /restore/gogs-backup-*.zip --tempdir /data/tmp
find /data/gogs /data/gogs.bak
'
This shows:
/data/gogs
/data/gogs/conf
/data/gogs/conf/app.ini
/data/gogs/log
/data/gogs/log/gogs.log
/data/gogs/log/xorm.log
/data/gogs/log/gorm.log
/data/gogs.bak
/data/gogs.bak/data
/data/gogs.bak/data/gogs.db
/data/gogs.bak/conf
/data/gogs.bak/log
/data/gogs.bak/log/xorm.log
/data/gogs.bak/log/gorm.log
The database was moved to /data/gogs.bak/data/gogs.db.
from gogs.
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.
from gogs.
Related Issues (20)
- backup/restore: User.Passwd renamed to .Password between v0.12 and v0.13 - restore fails to restore passwords HOT 1
- Backing up fails due to a missing file HOT 1
- 加载慢 HOT 10
- Error 1062 (23000): Duplicate entry '' for key 'access_token.sha256' HOT 2
- panic: runtime error: invalid memory address or nil pointer dereference - push commit HOT 4
- how to migrate gogs from sqlite to mariaDB(mysql) ?
- Add riscv64 support
- Database changes in 0.12.11? HOT 1
- Docker gogs started with an error message HOT 3
- Docker gogs cannot be restarted HOT 2
- mention user popover helper
- SSL Certificate error on https://try.gogs.io/ HOT 1
- Use user request 'Host' replace `conf.Server.ExternalURL` in `internal/route/lfs /batch.go`
- Release [VERSION] HOT 1
- klish
- gogs demo site SSL config is wrong and can't be bypassed
- gogs restore report: The system cannot move the file to a different disk drive. It's caused by 'rename' file to a different disk drive on Windows Server 2019.
- Error upgrading 0.12.* to 0.13
- Docker container directly copy file migration, causing subsequent submissions to be invisible but can be pulled
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gogs.