Skip to content
This repository was archived by the owner on Dec 2, 2017. It is now read-only.

Commit 0c5db9b

Browse files
issmirnovlunny
authored andcommitted
add 'usage' section with explanation of 'dump' command (#40)
1 parent 29aa4e6 commit 0c5db9b

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

content/doc/usage.en-us.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
date: "2016-12-27T16:00:00+02:00"
3+
title: "Usage"
4+
slug: "usage"
5+
weight: 35
6+
toc: false
7+
draft: false
8+
menu:
9+
sidebar:
10+
name: "Usage"
11+
weight: 35
12+
identifier: "usage"
13+
---
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
date: "2016-12-27T16:00:00+02:00"
3+
title: "Usage: Backup and Restore"
4+
slug: "backup-and-restore"
5+
weight: 11
6+
toc: true
7+
draft: false
8+
menu:
9+
sidebar:
10+
parent: "usage"
11+
name: "Backup and Restore"
12+
weight: 11
13+
identifier: "backup-and-restore"
14+
---
15+
16+
# Backup and Restore
17+
18+
Gitea currently has a `dump` command that will save your installation to a zip
19+
file. There will be a `restore` command implemented at some point in the future.
20+
You will be able to use this to back up your installation, as well as make
21+
migrating servers easier.
22+
23+
## Backup Command (`dump`)
24+
25+
First, switch to the user running gitea: `su git` (or whatever user you are
26+
using). Run `./gitea dump` in the gitea installation directory. You should
27+
see some output similar to this:
28+
29+
```
30+
2016/12/27 22:32:09 Creating tmp work dir: /tmp/gitea-dump-417443001
31+
2016/12/27 22:32:09 Dumping local repositories.../home/git/gitea-repositories
32+
2016/12/27 22:32:22 Dumping database...
33+
2016/12/27 22:32:22 Packing dump files...
34+
2016/12/27 22:32:34 Removing tmp work dir: /tmp/gitea-dump-417443001
35+
2016/12/27 22:32:34 Finish dumping in file gitea-dump-1482906742.zip
36+
```
37+
38+
Inside the `gitea-dump-1482906742.zip` file, you will find the following:
39+
40+
* `custom/conf/app.ini` - This is your server config.
41+
* `gitea-db.sql` - the mysql dump (TODO add info for other databases)
42+
* `gitea-repo.zip` - This zip will be a complete copy of your repo folder.
43+
See Config -> repository -> `ROOT` for the location.
44+
* `log/` - this will contain various logs. You don't need these if you are doing
45+
a migration.
46+
47+
## Restore Command (`restore`)
48+
49+
WIP: Does not exist yet.

0 commit comments

Comments
 (0)