Skip to content

Commit 15c2900

Browse files
committed
enhance usage documentation on README.md
1 parent 59afba7 commit 15c2900

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

README.MD

+19-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,25 @@ The plugin provides 2 ways to backup the H2 database:
1717
- via an administration page and a backup button
1818
- via an HTTP call to http://YOUR_GITBUCKET/database/backup
1919

20-
In current version database backup file is written to `GITBUCKET_HOME/.gitbucket/gitbucket-database-backup.zip`.
20+
Default backup file points to `GITBUCKET_DATA/gitbucket-database-backup.zip` where _GITBUCKET_DATA_ is on a standard gitbucket installation `~/.gitbucket`
21+
22+
### UI usage
23+
24+
- goto the `System Administration` menu, section `H2 Backup`
25+
- modify the file path if the default one doesn't fit your needs
26+
- hit the `Export database` button
27+
28+
![backup ui](https://cloud.githubusercontent.com/assets/1119660/9659908/3d0afcd4-5253-11e5-8124-39f8a538f6c3.png)
29+
30+
### HTTP call usage
31+
32+
Using your prefered tool (curl, wget, ...) it is possible fire a backup of the H2 database.
33+
34+
The URL to call looks like `http://YOUR_GITBUCKET/database/backup`.
35+
36+
You can pass an optional argument `dest` that references the destination file path where the backup will be done on the server. For example calling `http://YOUR_GITBUCKET/database/backup?dest=/var/backups/gitbucket.zip` will do an H2 backup of the gitbucket database into the file `/var/backups/gitbucket.zip`.
37+
38+
On success, you will receive a `HTTP 200` answer with a body containing the word `done`.
2139

2240
## Release Notes
2341

0 commit comments

Comments
 (0)