This plugin enhances takezoe/gitbucket by offering a way to backup/dump the h2 database of gitbucket.
It originates from pull request #845 and can be used to adress database backup described in gitbucket backup documentation
This plugin allows to backup the underlying H2 database used by default by gitbucket.
The plugin provides 2 ways to backup the H2 database:
- via an administration page and a backup button
- via an HTTP call to http://YOUR_GITBUCKET/database/backup
Default backup file points to GITBUCKET_DATA/gitbucket-database-backup.zip where GITBUCKET_DATA is on a standard gitbucket installation ~/.gitbucket
- goto the
System Administrationmenu, sectionH2 Backup - modify the file path if the default one doesn't fit your needs
- hit the
Export databasebutton
Using your prefered tool (curl, wget, ...) it is possible fire a backup of the H2 database.
The URL to call looks like http://YOUR_GITBUCKET/database/backup.
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.
On success, you will receive a HTTP 200 answer with a body containing the word done.
| Plugin version | GitBucket version |
|---|---|
| 1.2.x | 4.x.y |
| 1.1.x | 3.11.x |
| 1.0.x | 3.6.x, 3.7.x, 3.8.x,, 3.9.x, 3.10.x |
sbt clean package
- copy gitbucket-announce-plugin.jar into GITBUCKET_HOME/plugins
- restart gitbucket
- binary compatibility with gitbucket 4.x
- recompilation to ensure binary compatibility with gitbucket 3.11
- introduce gitbucket-h2-backup-plugin
- allows to backup h2 database via a live dump
