0

hi guys so I have a bot in discord which constantly adds data to an excel file but after a full day that we deployed on Heroku it did a full reset the excel file and the bot, but in Heroku there's nothing wrong, I payed the 7$/hobby plan which is described "never sleeps" can someone help me solve the issue ? it's an emergency for me I would highly appreciate if someone solves

  • Heroku's filesystem is temporary and gets reset with every deployment and at least once daily. You cannot use an Excel file to store data as a result; you'll need a real database. https://help.heroku.com/K1PPS2WM/why-are-my-file-uploads-missing-deleted – ceejayoz Jan 19 '21 at 21:10
  • See also: [No permanent filesystem for Heroku?](https://stackoverflow.com/questions/12123050/no-permanent-filesystem-for-heroku) – ceejayoz Jan 19 '21 at 21:10
  • @ceejayoz can you help me with a solution on Heroku? I can pay for anything but I don't want a reset anytime – Serop Elmayan Jan 19 '21 at 21:37
  • You could host your excel file outside of your heroku instance or look for some other hosting solution like Digitalocean, Linode or alike – kissu Jan 19 '21 at 22:29

1 Answers1

0

Heroku file system is ephemeral, meaning Dyno applications can write on the file system but changes are discared when the Dyno restarts.
Dynos restart every 24hrs, even the ones you pay for, so local changes never last.

You must use an external storage: Amazone S3, FTP hosting, Dropbox, etc...

If you are looking for free file storage options I have create a Github repo with some info and references.
There are several alternatives that offer a free tier (limited space) and can be accessed securely (token or credentials) via an API:

  • Github (simple, free, unlimited space, suitable for saving few files)
  • S3 (most popular, very cheap, suitable for small and very large volumes)
  • DriveHQ (free with limited space, FTP hosting)
  • Dropbox (free with limited space, great Web UI to manage your files)
Beppe C
  • 11,256
  • 2
  • 19
  • 41