Skip to content
This repository was archived by the owner on Sep 26, 2026. It is now read-only.
femiwikiPublic archive

About

🤖 페미위키 MySQL 백업봇

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

backupbot Docker Badge

A Docker image for dumping MySQL that contains MediaWiki data and uploading to AWS S3 periodically. This image is designed for FemiWiki.

# 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.
  • HEALTHCHECK_URL: A Healthchecks.io ping URL. It is pinged once a dump of a plausible size has reached S3, and $HEALTHCHECK_URL/fail is pinged when a run ends any other way, so a missed backup is noticed without anyone reading the logs. If SSM_SECRETS is set, the URL is read from the /mysql/backup/healthcheck-url parameter instead. Nothing is pinged when neither is given.

Restoring a wiki from backup

# Replace DB_USERNAME and DB_PASSWORD with actual values
mysql -uDB_USERNAME -pDB_PASSWORD < dump_of_wikidb.sql

Run rebuildall.php script. See 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.

About

🤖 페미위키 MySQL 백업봇

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Sponsor this project

Packages

Contributors

Languages