Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
  • 1 commit
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Commits on Mar 21, 2018
* Mount the Trac with the :z parameter
The SELinux configuration of the host by default does not allow writing on the /var directory. This parameter makes sure that the proper permissions are set up.

* Add a backup script for the Trac instance

This script performs a manual pg_dump. This is done because the pg_dump
version has to match the server version. By doing the dump manually
(and not through the trac-admin hotcopy command) we avoid being
dependent on a specific version.
Showing with 17 additions and 1 deletion.
  1. +1 −1 docker-compose.yaml
  2. +16 −0 tools/cron/trac-hotcopy
@@ -64,7 +64,7 @@ services:
image: nielx/trac
restart: on-failure
volumes:
- trac_data:/var/trac
- trac_data:/var/trac:z
depends_on:
- postgres
buildbot:
@@ -0,0 +1,16 @@
#!/bin/sh
TRAC_CONTAINER_ID=$(docker ps --filter "name=infrastructure_trac_1" -q)
POSTGRES_CONTAINER_ID=$(docker ps --filter "name=infrastructure_postgres_1" -q)

# Clean up possible left-overs from a previous backup
docker exec $TRAC_CONTAINER_ID rm -r /var/trac/db-backup.sql /var/trac/trac-backup/

# Dump the backup of the database
docker exec $POSTGRES_CONTAINER_ID pg_dump -U baron trac | docker exec -i $TRAC_CONTAINER_ID dd of=/var/trac/db-backup.sql
# Perform the hot-copy
docker exec $TRAC_CONTAINER_ID trac-admin /var/trac/dev.haiku-os.org/ hotcopy /var/trac/trac-backup --no-database
docker exec $TRAC_CONTAINER_ID mv /var/trac/db-backup.sql /var/trac/trac-backup/db

# Remove the old backup and save the new one
docker exec $TRAC_CONTAINER_ID rm /var/trac/trac-backup.tar.bz2
docker exec $TRAC_CONTAINER_ID tar -cjf /var/trac/trac-backup.tar.bz2 /var/trac/trac-backup/

No commit comments for this range

You can’t perform that action at this time.