Skip to content

femiwiki/backupbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

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.