Skip to content
eladeyal-intel edited this page Oct 28, 2019 · 6 revisions

The manual has a chapter on rake tasks for production.

Export / Import conferences

Creates a folder under tmp/frab_export containing serialized data and all attachments:

RAILS_ENV=production CONFERENCE=acronym rake frab:conference_export

Import a conference into another frab:

RAILS_ENV=production rake frab:conference_import

Export attachments

frab:conference_export_attachments exports all attachments from a frab conference. It can be used to carry all the files to the conference location on removable media, as backup. The conference data is written to <EXPORT_ROOT>/<conference_acronym>/, based on the environment variables EXPORT_ROOT (default tmp/attachments) and CONFERENCE. as a collection of archive files, partitioned by track and attachment type. Example

RAILS_ENV=production CONFERENCE=fishcon2020 EXPORT_ROOT=/mnt/media/usb1/ rake frab:conference_export_attachments

Sending Mails

RAILS_ENV=production rake frab:bulk_mailer subject="Conference Invite" [email protected] emails=emails.lst body=body.txt.erb

Migrating from pentabarf

frab comes with a script that offers limited capabilities of migrating data from pentabarf. For it to work, you need access to pentabarf's database and configure it in config/database.yml under the key "pentabarf".

Then simply run

rake pentabarf:import:all

Please note, that the script has not been tested with HEAD and will most probably not work. If you still want to try it out, checkout the code at the revision the script was last changed at and upgrade the code and migrate the database from there.

Create fake data

For development, it might be helpful to have some fake data around that allows for better testing. The following command will create a bunch of tracks, persons and events in a random existing conference. Call it multiple times if you need more records.

rake frab:add_fake_data

You may also call the following tasks manually.

rake frab:add_fake_tracks
rake frab:add_fake_persons
rake frab:add_fake_events
Clone this wiki locally