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
Project ID:
57c72949-2284-439b-b986-4496da49cf3b
57c72949-2284-439b-b986-4496da49cf3b
railway shell
is a local shell with the service variables available, you need to have pg_dump installed locallyI want to install it in railway so that I could use it in my application
try adding a nixpacks.toml file to your project with this in it
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'
please enclose code or logs in triple backticks
ive updated this, please try this instead