Skip to content

Commit

Permalink
Change the container name from wiki-backup to backup
Browse files Browse the repository at this point in the history
  • Loading branch information
arulrajnet committed Apr 27, 2024
1 parent c802e59 commit 2339cdb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ This docker image will backup the mediawiki database (MySQL based) and config fi
To start the backup container

```bash
docker-compose build wiki-backup
docker-compose up -d wiki-backup
docker-compose build backup
docker-compose up -d backup
```

The **required environmental** variables are
Expand Down Expand Up @@ -67,14 +67,14 @@ This will backup MySQL database and everything in `/mediawiki` mounted folder.
To restore the from s3 backup

```bash
docker-compose run wiki-backup restore
docker-compose run backup restore
```

Then you will entered into a shell. By default it will display the latest 10 backup files like below

```bash
docker-compose run --rm wiki-backup restore
Creating mediawiki-backup-restore_wiki-backup_run ... done
docker-compose run --rm backup restore
Creating mediawiki-backup-restore_backup_run ... done
2022/03/06 15:39:13 Waiting for: tcp://db:3306
2022/03/06 15:39:13 Connected to tcp://db:3306
2022-03-06 07:50:04 440 Bytes 2022-03-06T075000Z.dump.sql.gz
Expand Down Expand Up @@ -124,15 +124,15 @@ Set your S3 credentials in .env file. Then

```bash
docker-compose up -d db
docker-compose run --rm -e "RESTORE_DATABASE=my_wiki" wiki-backup restore
docker-compose run --rm -e "RESTORE_DATABASE=my_wiki" backup restore
```

Then exec into the restore container

### To override anything on restore

```bash
docker-compose run --rm -e "RESTORE_DATABASE=new_my_wiki" -v "/var/www/html:/mediawiki" wiki-backup restore
docker-compose run --rm -e "RESTORE_DATABASE=new_my_wiki" -v "/var/www/html:/mediawiki" backup restore
```

Refer
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ services:
- mysqldb-data:/var/lib/mysql
restart: on-failure

wiki-backup:
backup:
<<: *default
build:
context: .
args:
# GIT_COMMIT load from .envrc via direnv
GIT_COMMIT_ID: ${GIT_COMMIT:-unspecified}
image: tamilwiki/mediawiki_backup_restore:dev
environment:
environment:
INIT_BACKUP: 1
MYSQL_HOST: ${MYSQL_HOST}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
Expand Down

0 comments on commit 2339cdb

Please sign in to comment.