Heroku Cedar stack filesystem without s3

Added by Alex Stout over 3 years ago

I have almost completely and successfully migrated my Redmine installation to heroku on the cedar stack.

I had a mysql redmine 2.3.3 install running locally for a few months, but we wanted to get it on the web on the cheap which brought me to Heroku. I updated Redmine to version 2.5.1 still using mysql, then used mysql2psql to migrate the data to postgresql, and successfully pushed Redmine v2.5.1 up to Heroku with plugins and themes in tact, and email through gmail is a go.

I also setup some cron tasks to run heroku tasks like pgbackups (then download them locally and scrap old dumps), and send redmine_reminders.

...Then I came to the task of backing up the attachments. On the local install, I would just compress the local files folder, but this folder doesn't exist on the heroku instance. I double checked that file uploads worked on Heroku, and they do! I even checked the database on the heroku server to see where it suggested the files were located and it gave this format:

disk_filename: "140610184025_Very-Basic-Globe-icon.png" 

and

disk_directory: "2014/06" 

But I can't find such a file or path on the heroku server. I also launched the rails console from the heroku server

heroku run rails c

and – to get the location of the most recent file – ran:

Attachment.last.diskfile 

which returned:

=> "/app/files/2014/06/140610184025_Very-Basic-Globe-icon.png" 

but, again, there's no files directory to be found and that precise path simply doesn't exist.

I don't want to pay for an Amazon s3 subscription and the free 5GB limit is too small. But I really want to be able to back up the file attachments.

If anyone has any idea where these files go by default or any other recommendations for filesystem alternatives (google drive?) and how to utilize them, I am all ears.

Thanks

Replies (2)

RE: Heroku Cedar stack filesystem without s3 - Added by Alex Stout over 3 years ago

I also just tested whether the files were somehow stored in the database (the actual file data) by importing the heroku database data to a local Redminee/PostgreSQL install...nope. So how are they storing the bloody files? I'm guessing that they themselves store it on another server (s3 perhaps) and reference those files in some sneaky way.

I will post a question on the Heroku forums and link it here.

RE: Heroku Cedar stack filesystem without s3 - Added by Alex Stout over 3 years ago

I guess Heroku (wisely) just relies on StackExchange for its help forum. Follow the link for the question I asked. Hopefully, I can get a productive answer.

http://stackoverflow.com/q/24168220/2949616

(1-2/2)