-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression when creating backup: backup file equal to disk size is created #13618
Comments
I digged a bit deeper and turning on verbosity I found the following bad case (docker exec)
2020/11/19 15:16:41 cmd/dump.go:278:runDump() [I] Dumping database...
2020/11/19 15:16:41 cmd/dump.go:32:addFile() [I] Adding file gitea-db.sql
2020/11/19 15:16:41 cmd/dump.go:290:runDump() [I] Adding custom configuration file from /data/gitea/conf/app.ini
2020/11/19 15:16:41 cmd/dump.go:32:addFile() [I] Adding file app.ini
2020/11/19 15:16:41 cmd/dump.go:55:addRecursive() [I] Adding dir custom
2020/11/19 15:16:41 cmd/dump.go:55:addRecursive() [I] Adding dir custom/conf
2020/11/19 15:16:41 cmd/dump.go:32:addFile() [I] Adding file custom/conf/backup_gitea_assets_19-11-2020.zip
Failed to include custom: custom/conf/backup_gitea_assets_19-11-2020.zip: copying contents: write /data/gitea/conf/backup_gitea_assets_19-11-2020.zip: no space left on device good case (interactive in the container)
2020/11/19 15:18:40 cmd/dump.go:278:runDump() [I] Dumping database...
2020/11/19 15:18:41 cmd/dump.go:32:addFile() [I] Adding file gitea-db.sql
2020/11/19 15:18:41 cmd/dump.go:290:runDump() [I] Adding custom configuration file from /data/gitea/conf/app.ini
2020/11/19 15:18:41 cmd/dump.go:32:addFile() [I] Adding file app.ini
2020/11/19 15:18:41 cmd/dump.go:306:runDump() [I] Custom dir /usr/local/bin/custom doesn't exist, skipped
2020/11/19 15:18:41 cmd/dump.go:55:addRecursive() [I] Adding dir log
2020/11/19 15:18:41 cmd/dump.go:370:runDump() [I] Finish dumping in file /data/gitea/conf/backup_gitea_assets_19-11-2020.zip Note the difference after Unfortunately setting 2020/11/19 15:24:09 cmd/dump.go:278:runDump() [I] Dumping database...
2020/11/19 15:24:09 cmd/dump.go:32:addFile() [I] Adding file gitea-db.sql
2020/11/19 15:24:09 cmd/dump.go:290:runDump() [I] Adding custom configuration file from /data/gitea/conf/app.ini
2020/11/19 15:24:09 cmd/dump.go:32:addFile() [I] Adding file app.ini
2020/11/19 15:24:09 cmd/dump.go:306:runDump() [I] Custom dir /foo doesn't exist, skipped
2020/11/19 15:24:09 cmd/dump.go:310:runDump() [I] Packing data directory...data
2020/11/19 15:24:09 cmd/dump.go:32:addFile() [I] Adding file data/gitea/conf/backup_gitea_assets_19-11-2020.zip
Failed to include data directory: data/gitea/conf/backup_gitea_assets_19-11-2020.zip: copying contents: write /data/gitea/conf/backup_gitea_assets_19-11-2020.zip: no space left on device
2020/11/19 15:24:13 cmd/dump.go:171:fatal() [F] Failed to include data directory: data/gitea/conf/backup_gitea_assets_19-11-2020.zip: copying contents: write /data/gitea/conf/backup_gitea_assets_19-11-2020.zip: no space left on device |
Is there a better way of doing backups via docker? This blocks us since we are unable to do automatic backups. I also added docker version info to the OP. |
@pat-s you just have to save: the database, config-file & data folder. so you could simply create your own backup solution based on your enviroment ... e.g. docker |
right! I was loosing focus. We are already backing up the DB and I could simply zip the other assets via the mounted volume 🤦
|
Same problem on 1.13.1 version. |
Same problem on 1.13.2 version. |
Always prevent the current file from being added to the dump. Fix go-gitea#13618 Signed-off-by: Andrew Thornton <art27@cantab.net>
OK this is a not a regression - just a change in behaviour. It was never expected that you would store your backups in the custom directory and within the path of things added to the dump. I've provided a PR to prevent adding the current dump file to the dump and to provide an option to prevent adding the custom dir. |
* Exclude the current dump file from the dump Always prevent the current file from being added to the dump. Fix #13618 Signed-off-by: Andrew Thornton <art27@cantab.net> * Add skip custom directory option Signed-off-by: Andrew Thornton <art27@cantab.net> * placate lint Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
[x]
):Description
When dumping a backup of a gitea docker install via
the output file that gets created fills up the whole disk space within ~10 seconds.
However, when executing the commands from above in parts, the backups is created just fine and finishes in < 1 sec:
I also tried this on
1.14.0+dev-233-g0615b668d
.The text was updated successfully, but these errors were encountered: