Skip to content
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

Improve Documentation for Restoration from backup #29321

Merged
merged 3 commits into from
Feb 25, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/content/administration/backup-and-restore.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ cd gitea-dump-1610949662
mv app.ini /etc/gitea/conf/app.ini
mv data/* /var/lib/gitea/data/
mv log/* /var/lib/gitea/log/
mv repos/* /var/lib/gitea/gitea-repositories/
mv repos/* /var/lib/gitea/data/gitea-repositories/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We seem to be inconsistent with this path throughout the docs, would suggest cleaning up:

$ rg gitea-repositories docs
docs/content/help/faq.en-us.md:76:  - Default `%(APP_DATA_PATH)/gitea-repositories`
docs/content/help/faq.zh-cn.md:77:  - 默认值为`%(APP_DATA_PATH)/gitea-repositories`
docs/content/administration/config-cheat-sheet.zh-cn.md:78:- `ROOT`: **%(APP_DATA_PATH)s/gitea-repositories**: 存放git工程的根目录,建议填绝对路径。
docs/content/administration/backup-and-restore.zh-cn.md:34:2016/12/27 22:32:09 Dumping local repositories.../home/git/gitea-repositories
docs/content/administration/backup-and-restore.zh-cn.md:91:mv repos/* /var/lib/gitea/gitea-repositories/
docs/content/administration/backup-and-restore.zh-cn.md:125:mv repos/* /data/git/gitea-repositories/
docs/content/administration/backup-and-restore.zh-cn.md:149:mv repos/* /var/lib/gitea/git/gitea-repositories
docs/content/administration/config-cheat-sheet.en-us.md:78:- `ROOT`: **%(APP_DATA_PATH)s/gitea-repositories**: Root path for storing all repository data.
docs/content/administration/config-cheat-sheet.en-us.md:550:- `ONLY_ALLOW_PUSH_IF_GITEA_ENVIRONMENT_SET`: **true**: Set to `false` to allow local users to push to gitea-repositories without setting up the Gitea environment. This is not recommended and if you want local users to push to Gitea repositories you should set the environment appropriately.
docs/content/administration/backup-and-restore.en-us.md:36:2016/12/27 22:32:09 Dumping local repositories.../home/git/gitea-repositories
docs/content/administration/backup-and-restore.en-us.md:95:mv repos/* /var/lib/gitea/gitea-repositories/
docs/content/administration/backup-and-restore.en-us.md:129:mv repos/* /data/git/gitea-repositories/
docs/content/administration/backup-and-restore.en-us.md:153:mv repos/* /var/lib/gitea/git/gitea-repositories

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's impossible to make them consistent.

  • Some are by default systemd installation, eg: /var/lib/gitea/data/gitea-repositories/
  • Some are caused by bugs: /var/lib/gitea/gitea-repositories/
  • Some are for docker: /data/git/gitea-repositories/
  • Some are for docker rootless: /var/lib/gitea/git/gitea-repositories

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, site admin should learn how to handle directories correctly .....

chown -R gitea:gitea /etc/gitea/conf/app.ini /var/lib/gitea

# mysql
Expand All @@ -111,6 +111,8 @@ With Gitea running, and from the directory Gitea's binary is located, execute: `

This ensures that application and configuration file paths in repository Git Hooks are consistent and applicable to the current installation. If these paths are not updated, repository `push` actions will fail.

If you still have issues, consider running `./gitea doctor check` to inspect possible errors (or run with `--fix`).

### Using Docker (`restore`)

There is also no support for a recovery command in a Docker-based gitea instance. The restore process contains the same steps as described in the previous section but with different paths.
Expand Down
Loading