Skip to content

Backup and Maintenance

Jonas Breder edited this page Sep 1, 2026 · 4 revisions

This page covers routine administrative tasks, maintenance routines, and update procedures for hroot.


Database Backup & Restoration (Docker)

Backup Database

Execute this command on the host server to export a compressed SQL dump of the database:

docker compose exec db mysqldump -u hroot -p hroot_production > backup_$(date +%F).sql

Restore Database

To restore a backup file to the database container:

cat backup.sql | docker compose exec -T db mysql -u hroot -p hroot_production

Update Procedures (Minor / Patch Updates)

For a complete and detailed walkthrough of all update scenarios (including major upgrades, background jobs, and migrating to Docker), see Updating an existing installation.

Docker-based Instances

  1. Backup database:
    docker compose exec db mysqldump -u hroot -p${DATABASE_PASSWORD} ${DATABASE_NAME:-hroot_production} > backup_$(date +%F).sql
  2. Pull latest code:
    git pull
  3. Rebuild & restart containers:
    docker compose up -d --build
  4. Run database migrations:
    docker compose exec web bundle exec rake db:migrate RAILS_ENV=production

Manual (Bare-Metal) Installations

  1. Backup database:
    mysqldump -u <db_user> -p <db_name> > backup_$(date +%F).sql
  2. Pull latest code:
    git pull
  3. Install gems:
    bundle install
  4. Run database migrations:
    RAILS_ENV=production bundle exec rake db:migrate
  5. Recompile assets:
    RAILS_ENV=production bundle exec rake assets:clobber
    RAILS_ENV=production bundle exec rake assets:precompile
  6. Update cronjobs:
    RAILS_ENV=production bundle exec whenever --update-crontab
  7. Restart application server:
    touch tmp/restart.txt  # for Passenger
    # or: sudo systemctl restart apache2 / nginx / puma

IT Administration Checklist

If hroot is configured to send emails using a university address space (e.g., @uni-hamburg.de), the university IT department must configure:

  1. Outbound Firewall Permission: Ensure outbound traffic on port 25 (or alternative SMTP ports like 465/587) is allowed for the server's IP address.
  2. SPF Record: The server's public IP address must be added to the university domain's SPF record as an authorized mail sender to prevent messages from ending up in spam folders.
  3. SMTP Relay Server (Recommended): Request a dedicated SMTP relay from your IT department to handle message signing and delivery centrally.

HROOT - Hamburg Registration and Organization Online Tool

  1. Installation

    1. System Requirements and Prerequisites

    2. Docker (precompiled)

    3. Docker (self-compiled)

    4. Manual Deployment

    5. First steps after installation

    6. Environment Configuration

    7. Backup and Maintenance

    8. Starting a local server and running automated tests

    9. Basic configuration

    10. Language configuration and timezone

    11. Custom field definitions

  2. Updating an existing installation

  3. Overview

    1. Roles: Users, Admins, Experimenters, Banking‐Administrators
    2. Experiments, Sessions, session types
  4. Subject pool and user management

    1. Browsing the pool
    2. Exporting data
    3. Adding users
    4. Deleting users
    5. Finding duplicate users
    6. More user management
  5. Experiment management

    1. Managing Experiments
    2. Adding Sessions
    3. Experiment and Session Inheritance
    4. Reserving locations (booking)
    5. Assign participants from the pool
    6. Inviting participants
    7. Session management
    8. Waiting list
    9. Invitations Scheduling and Digests
  6. Admission

    1. QR Code Admission
    2. Online Waiting Room
    3. Online Surveys and Completion Links
  7. Calendar

  8. Sending messages

    1. Invitation emails
    2. Confirmation emails
    3. Session reminder emails
    4. Default locale and date formats
    5. SMS and Push Notifications
  9. Settings

    1. Shibboleth Integration
    2. Kimai Integration
  10. Staff Management

  11. Finance

  12. Pools Management

Clone this wiki locally