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
Percy10mo ago
Project ID: 7f64daff-585a-4948-99d9-3722f6dfefe5
infntLoop
infntLoop10mo ago
7f64daff-585a-4948-99d9-3722f6dfefe5
Brody
Brody10mo ago
No description
Brody
Brody10mo ago
redeploy postgres first
infntLoop
infntLoop10mo ago
In progress fingers crossed Both restored, but the data is not there
Brody
Brody10mo ago
how have you verified that the data isnt there?
infntLoop
infntLoop10mo ago
I opened my strapi application and there is no data
Brody
Brody10mo ago
is the data in the database?
infntLoop
infntLoop10mo ago
No
infntLoop
infntLoop10mo ago
No description
Brody
Brody10mo ago
where you running strapi in development mode?
infntLoop
infntLoop10mo ago
The DB variables are in the application Should be linked Yes in development
Brody
Brody10mo 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
infntLoop10mo ago
Its okay, I have a db dump, is there a way I can restore it?
Brody
Brody10mo ago
how did you take the db backup?
infntLoop
infntLoop10mo ago
Through pg_dump -U railway -h Asking if there is a way in the ui itself
Brody
Brody10mo ago
nope no native database restore, you would need to use pg_restore
infntLoop
infntLoop10mo ago
Thank you @Brody Let me try that and hopefully all will be good
Brody
Brody10mo ago
going forward, please only run strapi in production mode when on railway
infntLoop
infntLoop10mo ago
sure thing In the pg restore, should I use the db URL starts with postgres:... or the project url?
Brody
Brody10mo ago
the database url
infntLoop
infntLoop10mo ago
Is it this one proxy.rlwy.net ....proxy.rlwy.net As I used this last time for the dump
Brody
Brody10mo ago
yep it would include that in the url
infntLoop
infntLoop10mo ago
Btw why I am getting the error in the above screenshot? While both db and app variables show in both sides
Brody
Brody10mo ago
no clue, the data tab is not reliable
infntLoop
infntLoop10mo ago
Understood Thanks again Got errors for all tables, already exists!
Brody
Brody10mo ago
interesting
infntLoop
infntLoop10mo 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
Brody10mo ago
then what is going on with strapi
infntLoop
infntLoop10mo ago
Weird Did a rollback to the previous last month's deployment Let's see Same same 😦
Brody
Brody10mo 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
infntLoop10mo ago
Checking now
infntLoop
infntLoop10mo ago
No description
Brody
Brody10mo ago
is your data in them
infntLoop
infntLoop10mo ago
Yes
Brody
Brody10mo ago
run strapi in production mode then
infntLoop
infntLoop10mo 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
Brody10mo ago
it may be more intuitive with staged changed turned on https://railway.app/account/feature-flags
infntLoop
infntLoop10mo ago
Still no data in production mode
Brody
Brody10mo ago
is strapi connecting to the correct database?
infntLoop
infntLoop10mo 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
Brody10mo 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
infntLoop10mo ago
I am sure there is a problem in connecting both services But as you said, it probably from strapi configurations side
Brody
Brody10mo ago
well are there any error logs in the strapi deployment?
infntLoop
infntLoop10mo ago
No!
Brody
Brody10mo ago
im out of ideas
infntLoop
infntLoop10mo ago
No description
infntLoop
infntLoop10mo ago
Its allright, let me playaround and figure it out
Brody
Brody10mo ago
sounds good, let me know if you find out anything!
infntLoop
infntLoop10mo 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/Bart10mo ago
if you application works without, you can leave it at that
infntLoop
infntLoop10mo 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/Bart10mo 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
infntLoop10mo ago
Didn't get you tbh Is there a way to change the roles for a postgres deployed service?
Attacler/Bart
Attacler/Bart10mo 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
infntLoop10mo ago
Ok Thank you
infntLoop
infntLoop10mo ago
No description
infntLoop
infntLoop10mo 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/Bart10mo 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
infntLoop10mo ago
and no data
Attacler/Bart
Attacler/Bart10mo ago
seems like there is data, otherwise it would not say that the fk relation already exists
infntLoop
infntLoop10mo 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/Bart10mo ago
i get it but lucky it doesnt 🙂
Want results from more Discord servers?
Add your server