My Hobby plan expired and less than a month later I have resubscribed but my apps shows removed

Both Strapi and Postgres. How can I reactivate them?
63 Replies
Percy
Percy5mo ago
Project ID: 7f64daff-585a-4948-99d9-3722f6dfefe5
infntLoop
infntLoop5mo ago
7f64daff-585a-4948-99d9-3722f6dfefe5
Brody
Brody5mo ago
No description
Brody
Brody5mo ago
redeploy postgres first
infntLoop
infntLoop5mo ago
In progress fingers crossed Both restored, but the data is not there
Brody
Brody5mo ago
how have you verified that the data isnt there?
infntLoop
infntLoop5mo ago
I opened my strapi application and there is no data
Brody
Brody5mo ago
is the data in the database?
infntLoop
infntLoop5mo ago
No
infntLoop
infntLoop5mo ago
No description
Brody
Brody5mo ago
where you running strapi in development mode?
infntLoop
infntLoop5mo ago
The DB variables are in the application Should be linked Yes in development
Brody
Brody5mo ago
then data is not written to the database im sorry to say but the data is likely gone, you should have ran strapi in production mode
infntLoop
infntLoop5mo ago
Its okay, I have a db dump, is there a way I can restore it?
Brody
Brody5mo ago
how did you take the db backup?
infntLoop
infntLoop5mo ago
Through pg_dump -U railway -h Asking if there is a way in the ui itself
Brody
Brody5mo ago
nope no native database restore, you would need to use pg_restore
infntLoop
infntLoop5mo ago
Thank you @Brody Let me try that and hopefully all will be good
Brody
Brody5mo ago
going forward, please only run strapi in production mode when on railway
infntLoop
infntLoop5mo ago
sure thing In the pg restore, should I use the db URL starts with postgres:... or the project url?
Brody
Brody5mo ago
the database url
infntLoop
infntLoop5mo ago
Is it this one proxy.rlwy.net ....proxy.rlwy.net As I used this last time for the dump
Brody
Brody5mo ago
yep it would include that in the url
infntLoop
infntLoop5mo ago
Btw why I am getting the error in the above screenshot? While both db and app variables show in both sides
Brody
Brody5mo ago
no clue, the data tab is not reliable
infntLoop
infntLoop5mo ago
Understood Thanks again Got errors for all tables, already exists!
Brody
Brody5mo ago
interesting
infntLoop
infntLoop5mo ago
I guess it means these tables already exists and no changes made to override!? Typically pg_restore should delete existing and replace it with the dump pg_restore: from TOC entry 3392; 1259 16501 INDEX upload_files_folder_path_index railway pg_restore: error: could not execute query: ERROR: relation "upload_files_folder_path_index" already exists Command was: CREATE INDEX upload_files_folder_path_index ON public.files USING btree (folder_path);
Brody
Brody5mo ago
then what is going on with strapi
infntLoop
infntLoop5mo ago
Weird Did a rollback to the previous last month's deployment Let's see Same same 😦
Brody
Brody5mo ago
check the database's table manually with desktop software like dbgate restarting starpi could have just caused it to create a migration with empty tables, you might need to overwrite them
infntLoop
infntLoop5mo ago
Checking now
infntLoop
infntLoop5mo ago
No description
Brody
Brody5mo ago
is your data in them
infntLoop
infntLoop5mo ago
Yes
Brody
Brody5mo ago
run strapi in production mode then
infntLoop
infntLoop5mo ago
Man I love railway, very efficient. The only challenge I am facing is in the environments, tried setting up both environments but ran into many issues
Brody
Brody5mo ago
it may be more intuitive with staged changed turned on https://railway.app/account/feature-flags
infntLoop
infntLoop5mo ago
Still no data in production mode
Brody
Brody5mo ago
is strapi connecting to the correct database?
infntLoop
infntLoop5mo ago
It should be, last time it ran it was connected On graphql playground, I can't find my data queries So its not
Brody
Brody5mo ago
then I'm not actually sure what's going on, I don't use strapi myself maybe strapi has a community you could ask in? railway isn't adding any real magic to the setup, it's a postgres docker image and strapi running in a container
infntLoop
infntLoop5mo ago
I am sure there is a problem in connecting both services But as you said, it probably from strapi configurations side
Brody
Brody5mo ago
well are there any error logs in the strapi deployment?
infntLoop
infntLoop5mo ago
No!
Brody
Brody5mo ago
im out of ideas
infntLoop
infntLoop5mo ago
No description
infntLoop
infntLoop5mo ago
Its allright, let me playaround and figure it out
Brody
Brody5mo ago
sounds good, let me know if you find out anything!
infntLoop
infntLoop5mo ago
@Brody my dump is very good and contains all the required data. The only issue is I am unable to restore it as there is no “railway role” which was the user who created the dump Is there a way to change a postgres service role/user name?
Attacler/Bart
Attacler/Bart5mo ago
if you application works without, you can leave it at that
infntLoop
infntLoop5mo ago
The db created has a role called postgres, I want to change that role name, is there a way? When I edited through the variables view, it throws authentication error But still success with connecting using the postgres, which means changing the role name didn't take effect
Attacler/Bart
Attacler/Bart5mo ago
imports will display errors because it could not execute the line that changes the owner/role but the other parts wont fail bcause of that
infntLoop
infntLoop5mo ago
Didn't get you tbh Is there a way to change the roles for a postgres deployed service?
Attacler/Bart
Attacler/Bart5mo ago
if you run an import/restore it will execute all lines in the provided file it will continue the job eventho errors occure so if you have a role change or something, it will just give you an error and continue with the next line of the import resulting in no dataloss or anything weired its probably fine to leave it like this other option is to make the desired role(s) yourself within postgres but it wont do much
infntLoop
infntLoop5mo ago
Ok Thank you
infntLoop
infntLoop5mo ago
No description
infntLoop
infntLoop5mo ago
All errors Restored the db on other postgres instances and restored successfully Even locally, restored without a single error or warning
Attacler/Bart
Attacler/Bart5mo ago
seems like the db is not empty, the restore will asume that there is nothing blocking in its way so you have 2 options, create a new DB and restore it into there
infntLoop
infntLoop5mo ago
and no data
Attacler/Bart
Attacler/Bart5mo ago
seems like there is data, otherwise it would not say that the fk relation already exists
infntLoop
infntLoop5mo ago
Oh let me try that Yes created a new one and restored successfully I was nervous because of this 'role doesn't exist' error and thought it would jeobradaize (however its spelled :D) the data integrity
Attacler/Bart
Attacler/Bart5mo ago
i get it but lucky it doesnt 🙂
Want results from more Discord servers?
Add your server
More Posts
Help with cron job in flask and postgresMy /api directory is: /api |-- models.py |-- app.py |-- config.py |-- cron.py I want to run a backeDjango | python manage.py flushHey, I have a django rest api that is set up and running. I'm in the need of flushing the database What are the general usage prices or just what to consider when using railway with tailscale vpn?im wondering if its cheap or very expensive if im connecting to this vpn a lot. or is it possible toMy Domain Registrar (Squarespace) does not support root @ CNAMEingI'm trying to working around this with cloudflare, but no go so far. Can someone help me with this?App Sleeping by environmentAre there any plans to allow sleeping on certain by environment? Ideally I should be able to configConnection to Namecheap DomainI have been struggling to connect my domain. In Namecheap, I’ve set to the following values Type: CCan't login with magic linkI got this error with code 500: { "message": "Internal Server Error", "reqId": "cae1c97a-e19Redis dropping connection and not restarting on multiple environments simultaneouslyNew to railway and hope someone can help. I have a Nest Api deployed on two environments (develop anGetting upstream errors, ALL requests failing outside of USHi team, we're unfortunately very close to moving off Railway due to a barrage of (likely) K8s errorGetting intermittent connection errors on all services connected to my uptime kuma.Network errors? They seem to be temporary but consistent. Every minute or so. Uptime kuma can't conn