8000 Add support for restore mode by mgruner · Pull Request #491 · zammad/zammad-docker-compose · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add support for restore mode #491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/tests/default.sh
< 8000 /tr>
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,17 @@ print_heading "Check if zammad-backup created a database backup"
# Check that the db dump actually has content in the .gz file to catch cases where pg_dump fails.
docker compose exec zammad-backup sh -c "find /var/tmp/zammad/ -name \"*zammad_db.psql.gz\" -size +1k | grep ."
print_heading "Database backup successful :)"

print_heading "Stop the stack"
docker compose down -t0

print_heading "Copy backup files to restore folder"
docker compose run --rm zammad-backup sh -c "mkdir /var/tmp/zammad/restore && cp /var/tmp/zammad/*gz /var/tmp/zammad/restore/"

print_heading "Start the stack again"
docker compose up -d
check_stack_start

print_heading "Check that restore folder was renamed after successful restore..."
docker compose exec zammad-backup sh -c "[ ! -d /var/tmp/zammad/restore ]"
print_heading "Restore folder was renamed after successful restore..."
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ x-shared:
image: ${IMAGE_REPO:-ghcr.io/zammad/zammad}:${VERSION:-6.5.0-75}
restart: ${RESTART:-always}
volumes:
- zammad-backup:/var/tmp/zammad:ro # needed for waiting on restore operations
- zammad-storage:/opt/zammad/storage
depends_on:
- zammad-memcached
Expand All @@ -67,7 +68,7 @@ services:
command: ["zammad-backup"]
volumes:
- zammad-backup:/var/tmp/zammad
- zammad-storage:/opt/zammad/storage:ro
- zammad-storage:/opt/zammad/storage
user: 0:0

zammad-elasticsearch:
Expand Down
Loading
0