This repository was archived by the owner on Dec 2, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Add 'usage' section with explanation of 'dump' command #40
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
date: "2016-12-27T16:00:00+02:00" | ||
title: "Usage" | ||
slug: "usage" | ||
weight: 35 | ||
toc: false | ||
draft: false | ||
menu: | ||
sidebar: | ||
name: "Usage" | ||
weight: 35 | ||
identifier: "usage" | ||
--- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
date: "2016-12-27T16:00:00+02:00" | ||
title: "Usage: Backup and Restore" | ||
slug: "backup-and-restore" | ||
weight: 11 | ||
toc: true | ||
draft: false | ||
menu: | ||
sidebar: | ||
parent: "usage" | ||
name: "Backup and Restore" | ||
weight: 11 | ||
identifier: "backup-and-restore" | ||
--- | ||
|
||
# Backup and Restore | ||
|
||
Gitea currently has a `dump` command that will save your installation to a zip | ||
file. There will be a `restore` command implemented at some point in the future. | ||
You will be able to use this to back up your installation, as well as make | ||
migrating servers easier. | ||
|
||
## Backup Command (`dump`) | ||
|
||
First, switch to the user running gitea: `su git` (or whatever user you are | ||
using). Run `./gitea dump` in the gitea installation directory. You should | ||
see some output similar to this: | ||
|
||
``` | ||
2016/12/27 22:32:09 Creating tmp work dir: /tmp/gitea-dump-417443001 | ||
2016/12/27 22:32:09 Dumping local repositories.../home/git/gitea-repositories | ||
2016/12/27 22:32:22 Dumping database... | ||
2016/12/27 22:32:22 Packing dump files... | ||
2016/12/27 22:32:34 Removing tmp work dir: /tmp/gitea-dump-417443001 | ||
2016/12/27 22:32:34 Finish dumping in file gitea-dump-1482906742.zip | ||
``` | ||
|
||
Inside the `gitea-dump-1482906742.zip` file, you will find the following: | ||
|
||
* `custom/conf/app.ini` - This is your server config. | ||
* `gitea-db.sql` - the mysql dump (TODO add info for other databases) | ||
* `gitea-repo.zip` - This zip will be a complete copy of your repo folder. | ||
See Config -> repository -> `ROOT` for the location. | ||
* `log/` - this will contain various logs. You don't need these if you are doing | ||
a migration. | ||
|
||
## Restore Command (`restore`) | ||
|
||
WIP: Does not exist yet. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong, it's not a "mysql dump" it's a plain "SQL dump" for any database that you happen to use.