![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
heroku-mongo-backup does:
Why not mongodump command?
mongodump command is not available on Heroku side. If you don't want to setup third party backup service for every project heroku-mongo-backup may be helpful.
Add gem to the Gemfile
: gem "heroku-mongo-backup"
- if everything's okay rake -T
command should show rake mongo:backup
rake tasks.
For S3 support heroku-mongo-backup requires s3
or aws-s3
or fog
library. One of those should be in Gemfile
, if you don't care add fog
it's seems to be the most advanced.
Configure heroku scheduler to run mongo:backup
rake task. Or if cron is used add backup task to /lib/tasks/cron.rake
file:
desc "This task is called by the Heroku cron add-on"
task :cron => :environment do
Rake::Task['mongo:backup'].invoke
end
Set Heroku environment variables:
heroku config:add S3_BACKUPS_BUCKET=_value_ S3_KEY_ID=_value_ S3_SECRET_KEY=_value_ MONGO_URL=_value_
On MONGO_URL place anyone of these is assaptable: MONGOHQ_URI or MONGOLAB_URI.
For FTP set these variables:
heroku config:add UPLOAD_TYPE=ftp FTP_HOST=_host_ FTP_PASSWORD=_pass_ FTP_USERNAME=_user_
heroku run rake mongo:backup
If you want to automatically remove old backup files pass MAX_BACKUPS
parameter to the rake command:
heroku run rake mongo:backup MAX_BACKUPS=7
If you're uploading to S3, backup files will be stored as backups/YYYY-MM-DD_hh-mm-ss.gz
by default. To change the directory name, pass in the S3_BACKUP_DIR
parameter:
heroku run rake mongo:backup S3_BACKUP_DIR=daily
daily/backup-file-name.gz
instead of backups/backup-file-name.gz
.Restore from backup:
heroku run rake mongo:restore FILE=backup-file-name.gz
If you want to restore from local file run:
rake mongo:restore LOCAL=/absolute/path/to/<backup-file.gz>
For Rails 2 add this to your Rakefile to import rake tasks:
import File.expand_path(File.join(Gem.datadir('heroku-mongo-backup'), '..', '..', 'lib', 'tasks', 'heroku_mongo_backup.rake'))
FAQs
Unknown package
We found that heroku-mongo-backup demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.