I have an app hosted on Heroku and I am trying to migrate from Heroku Redis to Redis Cloud.
According to this documentation, I can easily migrate the data from my current Heroku Redis to a new Redis Cloud by using --fork flag.
https://devcenter.heroku.com/articles/rediscloud#migrating-from-an-existing-redis-server-to-redis-cloud
However, when I ran the command, it did create a new Redis Cloud instance but the instance doesn't have the data from my Heroku Redis instance.
This is the command that I used to create the instance
heroku addons:create rediscloud:100 --fork=`heroku config:get REDIS_URL -a app-name` -a app-name
Is the --fork flag only works for databases ?
Correct, fork will make a copy of the application, it's addons and data contained in Heroku Postgres.
Related
I installed Redis Enterprise Cloud on my dyno on Heroku for the first time and didn't find any config in settings as described in the docs
Once Redise Cloud has been added, you will notice a REDISCLOUD_URL config vars in your heroku config containing the username, password, hostname and port of your first Redis Cloud database.
How can I get the REDISCLOUD_URL config after it's installing this addon?
Check the getting started doc:
https://devcenter.heroku.com/articles/rediscloud#getting-started
$ heroku config:get REDISCLOUD_URL
I'm trying to run the Dockerized Spring Boot application on Heroku. I use dockerfile-maven and plugin to create the app I use this commands
heroku apps:create my-app-name --buildpack heroku/java
heroku addons:create heroku-postgresql:hobby-dev --app my-app-name
Notice that I'm using buildpack here.
In application.properties I have such lines
spring.datasource.url=${JDBC_DATABASE_URL:some default jdbc connection string}
spring.datasource.username=${JDBC_DATABASE_USERNAME}
spring.datasource.password=${JDBC_DATABASE_PASSWORD}
How I understand if I set the heroku/java buildpack for the app the environment variables JDBC_DATABASE_URL should be created but in my case, I see the default connection string in logs. That's mean that JDBC_DATABASE_URL is not set or not available. Why that's could happen?
Worth to mention that DATABASE_URL environment variable is available in the application.
From a remote shell, using the Heroku toolbelt, it's pretty easy to trigger a db backup with:
heroku pg:backups:capture --app my-app
But how can I do that from a script running on the app itself? Something triggered from the heroku scheduler or manually like:
heroku run node myScript.js --app my-app
I have psql available so maybe that's an option although I don't know where to write to.
I don't see a way to do this via API here: https://devcenter.heroku.com/articles/platform-api-reference
I having being trying to run pg:pull from my Heroku app which one has a database on Amazon RDS, but the commands keep returning 'app-name has no databases' even if I use the database url set on my Config Vars .. Am I missing something ?
try ...
heroku pg:pull DATABASE_URL local_database_name --remote app_name
return ...
app_name has no databases
heroku pg:pull is not compatible with databases that aren't hosted on the plaform. This is specified in the documentation:
pg:pull can be used to pull remote data from a Heroku Postgres database to a database on your local machine. The command looks like this:
You will need to run pg_dump and a subsequent pg_restore manually to achieve the same result as the automated pg:pull command.
According to the documentation, Heroku passes KAFKA_TRUSTED_CERT, KAFKA_CLIENT_CERT and KAFKA_CLIENT_CERT_KEY directly into my heroku applications. In consequence, only applications running on heroku can access Heroku Kafka? I would like to access it directly from my home workstation but i dont know how to get the ENVs
You can run either heroku config --app your_application_name to get all variables, or run heroku config:get KAFKA_TRUSTED_CERT --app your_application_name to just get one specific variable.
You can also login to Heroku dashboard and find all variables there in "Settings" section of your app.