R
Railway16mo ago
Rawlo

Quick q: Where do i db_restore?

I read this post https://blog.railway.app/p/automated-postgresql-backups , but as a SQL newb i need more context on where/how to run the pg_restore command. I use pgAdmin.
Railway Blog
Automated PostgreSQL Backups
A step-by-step guide on automatic PostgreSQL backups on Railway using a one-click template.
9 Replies
Percy
Percy16mo ago
Please provide your project ID or reply with N/A. Thread will automatically be closed if no reply is received within 10 minutes. You can copy your project's id by pressing Ctrl/Cmd + K -> Copy Project ID.
angelo
angelo16mo ago
You need to run it from the terminal when you connect to Postgres instance.
Percy
Percy16mo ago
⚠️ experimental feature
Percy
Percy16mo ago
No project ID was provided. Closing thread.
Rawlo
Rawlo16mo ago
im running it but no warning or any sign of backup complete Open terminal -> "psql -U postgres" -> "pg_restore -d [database url] [.tar file location]" on windows
angelo
angelo16mo ago
I don't have time to run you through it (wish I did) but you shouldn't really be running it primarily locally.
Rawlo
Rawlo16mo ago
where then? understand if u dont have time
angelo
angelo16mo ago
The goal is to have the cron run on Railway, not your machine as your machine isn't running 24/7
Rawlo
Rawlo16mo ago
Right but how do i actually restore it? Like where do i type the pg_restore command? i have the cron setup and running, populating S3 with backups. my question refers to actuallly restoring using the "pg_restore" command