-
Notifications
You must be signed in to change notification settings - Fork 30
Copying Resumes for Sponsors
Stuart Olivera edited this page Mar 7, 2018
·
2 revisions
Steps to download resumes for Sponsor book:
# SSH into the box
dokku enter brickhack-prod web
mkdir /app/tmp/resumes/
rails c
Once in the Rails console:
qs = Questionnaire.where("can_share_info = 1").where("can_share_info = 1")
qs.count # Verify the number of questionnaires that checked in & shared info
qs.each { |q| q.resume? && q.resume.copy_to_local_file('original', "tmp/resumes/#{q.id}-#{q.resume_file_name}") }
# Will print log of each file downloaded
exit
Back in the shell session, still inside the brickhack-prod
container:
zip -r /app/tmp/resumes.zip /app/tmp/resumes/
# Take note of the container ID in the hostname - e.g., "c06fe90506ab" in "herokuishuser@c06fe90506ab:~$"
exit
Back in the original shell session:
sudo su dokku
docker cp container_id:/app/tmp/resumes.zip ~/resumes.zip
exit
Then, just copy the file at /home/dokku/resumes.zip to your machine.