https://github.com/femiwiki/backupbot
:robot: 페미위키 MySQL 백업봇
https://github.com/femiwiki/backupbot
bot docker-image mysql
Last synced: 4 months ago
JSON representation
:robot: 페미위키 MySQL 백업봇
- Host: GitHub
- URL: https://github.com/femiwiki/backupbot
- Owner: femiwiki
- License: agpl-3.0
- Created: 2019-02-02T14:57:36.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2025-08-31T08:54:51.000Z (10 months ago)
- Last Synced: 2025-08-31T10:23:34.616Z (10 months ago)
- Topics: bot, docker-image, mysql
- Language: Dockerfile
- Homepage:
- Size: 66.4 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Copyright: COPYRIGHT
Awesome Lists containing this project
README
# backupbot [![Docker Badge]][docker hub]
A Docker image for dumping [MySQL] that contains [MediaWiki] data and uploading to [AWS S3] periodically. This image is designed for [FemiWiki].
```bash
# Configuring network is required
# Passing username and password as environment variables
docker run --detach \
--name backupbot \
--restart always \
-e 'DB_USERNAME=xxxxxxxx' \
-e 'DB_PASSWORD=xxxxxxxx' \
femiwiki/backupbot
# Alternatively, you can provide LocalSettings.php instead
docker run --detach \
--name backupbot \
--restart always \
-v $PWD/LocalSettings.php:/a/LocalSettings.php \
femiwiki/backupbot
```
## Environment variables
- `DB_SERVER`: The user name passed to access the database. If `/a/LocalSettings.php` is exist, this will be ignored. Default to `localhost`.
- `DB_USERNAME`: The user name passed to access the database. If `/a/LocalSettings.php` is exist, this will be ignored.
- `DB_PASSWORD`: The password passed to access the database. If `/a/LocalSettings.php` is exist, this will be ignored.
- `LOCAL_SETTINGS`: The absolute path to LocalSettings.php that declares `$wgDBserver`, `$wgDBuser` and `$wgDBpassword`. Default to `/a/LocalSettings.php`.
## Restoring a wiki from backup
```sh
# Replace DB_USERNAME and DB_PASSWORD with actual values
mysql -uDB_USERNAME -pDB_PASSWORD < dump_of_wikidb.sql
```
Run [rebuildall.php](https://www.mediawiki.org/wiki/Manual:Rebuildall.php) script.
See [Restoring a wiki from backup](https://www.mediawiki.org/wiki/Manual:Restoring_a_wiki_from_backup) for details.
---
The source code of _backupbot_ is primarily distributed under the terms of
the [GNU Affero General Public License v3.0] or any later version. See
[COPYRIGHT] for details.
[docker badge]: https://badgen.net/badge/icon/docker?icon=docker&label
[docker hub]: https://github.com/orgs/femiwiki/packages/container/backupbot
[mysql]: https://www.mysql.com/
[mediawiki]: https://www.mediawiki.org/
[femiwiki]: https://femiwiki.com
[localsettings.php]: https://www.mediawiki.org/wiki/Manual:LocalSettings.php
[aws s3]: https://aws.amazon.com/s3/
[gnu affero general public license v3.0]: LICENSE
[copyright]: COPYRIGHT