R
Railway13mo ago
deathx02

How can I use pg_dump in railway shell

I tried to use /root/.nix-profile/bin/pg_dump but its not working so how am I supposed to use pg_dump
7 Replies
Percy
Percy13mo ago
Project ID: 57c72949-2284-439b-b986-4496da49cf3b
deathx02
deathx02OP13mo ago
57c72949-2284-439b-b986-4496da49cf3b
Brody
Brody13mo ago
railway shell is a local shell with the service variables available, you need to have pg_dump installed locally
deathx02
deathx02OP13mo ago
I want to install it in railway so that I could use it in my application
Brody
Brody13mo ago
try adding a nixpacks.toml file to your project with this in it
[phases.setup]
nixPkgs = ['...', 'postgresql']
[phases.setup]
nixPkgs = ['...', 'postgresql']
deathx02
deathx02OP13mo ago
ohhk thanks let me try it Traceback (most recent call last): File "/opt/venv/lib/python3.8/site-packages/telegram/ext/utils/promise.py", line 96, in run self._result = self.pooled_function(self.args, **self.kwargs) File "/app/backup.py", line 66, in manual_backup pg_dump(url.host, url.port, url.database, url.username, out=BACKUPFILE, password=url.password) File "/app/backup.py", line 49, in pg_dump backup_data = subprocess.check_output(command, env=pass_env) File "/root/.nix-profile/lib/python3.8/subprocess.py", line 415, in check_output return run(popenargs, stdout=PIPE, timeout=timeout, check=True, File "/root/.nix-profile/lib/python3.8/subprocess.py", line 493, in run with Popen(*popenargs, **kwargs) as process: File "/root/.nix-profile/lib/python3.8/subprocess.py", line 858, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/root/.nix-profile/lib/python3.8/subprocess.py", line 1720, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'pg_dump'
Brody
Brody13mo ago
please enclose code or logs in triple backticks ive updated this, please try this instead
Want results from more Discord servers?
Add your server