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
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.You need to run it from the terminal when you connect to Postgres instance.
You might find these helpful:
- Backup & restore Postgres Database
- How to Backup and Restore Your Postgres Database
⚠️ experimental feature
No project ID was provided. Closing thread.
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
I don't have time to run you through it (wish I did) but you shouldn't really be running it primarily locally.
where then?
understand if u dont have time
The goal is to have the cron run on Railway, not your machine
as your machine isn't running 24/7
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