Repository navigation
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.
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).sqlTo restore a backup file to the database container:
cat backup.sql | docker compose exec -T db mysql -u hroot -p hroot_productionFor a complete and detailed walkthrough of all update scenarios (including major upgrades, background jobs, and migrating to Docker), see Updating an existing installation.
-
Backup database:
docker compose exec db mysqldump -u hroot -p${DATABASE_PASSWORD} ${DATABASE_NAME:-hroot_production} > backup_$(date +%F).sql
-
Pull latest code:
git pull
-
Rebuild & restart containers:
docker compose up -d --build
-
Run database migrations:
docker compose exec web bundle exec rake db:migrate RAILS_ENV=production
-
Backup database:
mysqldump -u <db_user> -p <db_name> > backup_$(date +%F).sql
-
Pull latest code:
git pull
-
Install gems:
bundle install
-
Run database migrations:
RAILS_ENV=production bundle exec rake db:migrate -
Recompile assets:
RAILS_ENV=production bundle exec rake assets:clobber RAILS_ENV=production bundle exec rake assets:precompile
-
Update cronjobs:
RAILS_ENV=production bundle exec whenever --update-crontab -
Restart application server:
touch tmp/restart.txt # for Passenger # or: sudo systemctl restart apache2 / nginx / puma
If hroot is configured to send emails using a university address space (e.g., @uni-hamburg.de), the university IT department must configure:
- Outbound Firewall Permission: Ensure outbound traffic on port 25 (or alternative SMTP ports like 465/587) is allowed for the server's IP address.
- 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.
- SMTP Relay Server (Recommended): Request a dedicated SMTP relay from your IT department to handle message signing and delivery centrally.
-
-
Subject pool and user management
-
Experiment management