mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +00:00
Reformat docs (#13897)
Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
parent
97ab820acc
commit
af79677a44
86 changed files with 1115 additions and 957 deletions
|
@ -3,7 +3,7 @@ date: "2017-01-01T16:00:00+02:00"
|
|||
title: "Usage: Backup and Restore"
|
||||
slug: "backup-and-restore"
|
||||
weight: 11
|
||||
toc: true
|
||||
toc: false
|
||||
draft: false
|
||||
menu:
|
||||
sidebar:
|
||||
|
@ -18,6 +18,10 @@ menu:
|
|||
Gitea currently has a `dump` command that will save the installation to a zip file. This
|
||||
file can be unpacked and used to restore an instance.
|
||||
|
||||
**Table of Contents**
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
## Backup Command (`dump`)
|
||||
|
||||
Switch to the user running Gitea: `su git`. Run `./gitea dump -c /path/to/app.ini` in the Gitea installation
|
||||
|
@ -34,12 +38,12 @@ directory. There should be some output similar to the following:
|
|||
|
||||
Inside the `gitea-dump-1482906742.zip` file, will be the following:
|
||||
|
||||
* `app.ini` - Optional copy of configuration file if originally stored outside of the default `custom/` directory
|
||||
* `custom` - All config or customization files in `custom/`.
|
||||
* `data` - Data directory in <GITEA_WORK_DIR>, except sessions if you are using file session. This directory includes `attachments`, `avatars`, `lfs`, `indexers`, sqlite file if you are using sqlite.
|
||||
* `gitea-db.sql` - SQL dump of database
|
||||
* `gitea-repo.zip` - Complete copy of the repository directory.
|
||||
* `log/` - Various logs. They are not needed for a recovery or migration.
|
||||
- `app.ini` - Optional copy of configuration file if originally stored outside of the default `custom/` directory
|
||||
- `custom` - All config or customization files in `custom/`.
|
||||
- `data` - Data directory in <GITEA_WORK_DIR>, except sessions if you are using file session. This directory includes `attachments`, `avatars`, `lfs`, `indexers`, sqlite file if you are using sqlite.
|
||||
- `gitea-db.sql` - SQL dump of database
|
||||
- `gitea-repo.zip` - Complete copy of the repository directory.
|
||||
- `log/` - Various logs. They are not needed for a recovery or migration.
|
||||
|
||||
Intermediate backup files are created in a temporary directory specified either with the
|
||||
`--tempdir` command-line parameter or the `TMPDIR` environment variable.
|
||||
|
@ -56,7 +60,7 @@ Example:
|
|||
docker exec -u <OS_USERNAME> -it -w <--tempdir> $(docker ps -qf "name=<NAME_OF_DOCKER_CONTAINER>") bash -c '/app/gitea/gitea dump -c </path/to/app.ini>'
|
||||
```
|
||||
|
||||
*Note: `--tempdir` refers to the temporary directory of the docker environment used by Gitea; if you have not specified a custom `--tempdir`, then Gitea uses `/tmp` or the `TMPDIR` environment variable of the docker container. For `--tempdir` adjust your `docker exec` command options accordingly.
|
||||
\*Note: `--tempdir` refers to the temporary directory of the docker environment used by Gitea; if you have not specified a custom `--tempdir`, then Gitea uses `/tmp` or the `TMPDIR` environment variable of the docker container. For `--tempdir` adjust your `docker exec` command options accordingly.
|
||||
|
||||
The result should be a file, stored in the `--tempdir` specified, along the lines of: `gitea-dump-1482906742.zip`
|
||||
|
||||
|
@ -67,7 +71,7 @@ involves moving files to their correct locations and restoring a database dump.
|
|||
|
||||
Example:
|
||||
|
||||
```none
|
||||
```sh
|
||||
apt-get install gitea
|
||||
unzip gitea-dump-1482906742.zip
|
||||
cd gitea-dump-1482906742
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue