[PR #2917] [CLOSED] WIP: Reimplement dump and implment restore command #16663

Closed
opened 2025-11-02 12:15:49 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/2917
Author: @lunny
Created: 11/15/2017
Status: Closed

Base: mainHead: lunny/dump_restore


📝 Commits (5)

📊 Changes

4 files changed (+302 additions, -17 deletions)

View changed files

📝 cmd/dump.go (+26 -17)
cmd/restore.go (+153 -0)
📝 main.go (+1 -0)
📝 models/models.go (+122 -0)

📄 Description

This PR would like to replace #1637. It reimplemented dump command and old dump file will not be used anymore. And also added a restore command that could restore dumped zip file to some machine. You have to use the same version Gitea with dump when restore.

The dump databases will be stored as <table_name>.yml in one directory. This format is expected to be compatible with Gitea's test fixtures. So that it's easy to export test data from a real system.

Currently it's blocked because yaml package didn't support Gonic name mapping, so I have forked yml package to https://github.com/go-gitea/yaml. Before that package supports that feature, this PR is not really work.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/2917 **Author:** [@lunny](https://github.com/lunny) **Created:** 11/15/2017 **Status:** ❌ Closed **Base:** `main` ← **Head:** `lunny/dump_restore` --- ### 📝 Commits (5) - [`5014204`](https://github.com/go-gitea/gitea/commit/5014204f6be1035fb3d0e266cfa0ac3ce2aeeb90) Reimplement dump and implment restore command - [`4fdb5fa`](https://github.com/go-gitea/gitea/commit/4fdb5fadf0fa4ca884ff83c65a5f92d242afb38a) fix name convert - [`7302de8`](https://github.com/go-gitea/gitea/commit/7302de86a8fcb31536ac3afcb2234c3c801db8d7) fix lint - [`dcb0811`](https://github.com/go-gitea/gitea/commit/dcb0811fd77f4bae4c2103905bd7997412e49d27) fix typo - [`c85526d`](https://github.com/go-gitea/gitea/commit/c85526deb80c8a503e12e928f30bb317956b813d) fix restore ### 📊 Changes **4 files changed** (+302 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `cmd/dump.go` (+26 -17) ➕ `cmd/restore.go` (+153 -0) 📝 `main.go` (+1 -0) 📝 `models/models.go` (+122 -0) </details> ### 📄 Description This PR would like to replace #1637. It reimplemented `dump` command and old dump file will not be used anymore. And also added a restore command that could restore dumped zip file to some machine. You have to use the same version Gitea with `dump` when `restore`. The dump databases will be stored as `<table_name>.yml` in one directory. This format is expected to be compatible with Gitea's test fixtures. So that it's easy to export test data from a real system. Currently it's blocked because yaml package didn't support Gonic name mapping, so I have forked yml package to https://github.com/go-gitea/yaml. Before that package supports that feature, this PR is not really work. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:15:49 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#16663