Open
Description
Hi,
Since recently, the command python manage.py dbrestore -I file.psql
does not work for me anymore.
You got any idea or help how to fix this?
I'm using Linux and psql (PostgreSQL) 15.2
and
django-dbbackup 4.0.2
Django 3.2.18
Python 3.10.10
(orpheus) ╭─fxw@earth ~/Documents/Orpheus/django/orpheuscc ‹master*›
╰─➤ python manage.py dbrestore -I ../orpheuscc_backup/orpheuscc/default-orpheus-2023-04-22-033304.psql [23-04-23 | 1:06:17]
Are you sure you want to continue? [Y/n] Y
Traceback (most recent call last):
File "/home/fxw/Documents/Orpheus/django/orpheuscc/manage.py", line 21, in <module>
main()
File "/home/fxw/Documents/Orpheus/django/orpheuscc/manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/home/fxw/Documents/Orpheus/django/orpheus/lib/python3.10/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/home/fxw/Documents/Orpheus/django/orpheus/lib/python3.10/site-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/fxw/Documents/Orpheus/django/orpheus/lib/python3.10/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/fxw/Documents/Orpheus/django/orpheus/lib/python3.10/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/home/fxw/Documents/Orpheus/django/orpheus/lib/python3.10/site-packages/dbbackup/management/commands/dbrestore.py", line 68, in handle
self._restore_backup()
File "/home/fxw/Documents/Orpheus/django/orpheus/lib/python3.10/site-packages/dbbackup/management/commands/dbrestore.py", line 118, in _restore_backup
self.connector.restore_dump(input_file)
File "/home/fxw/Documents/Orpheus/django/orpheus/lib/python3.10/site-packages/dbbackup/db/base.py", line 105, in restore_dump
return self._restore_dump(dump)
File "/home/fxw/Documents/Orpheus/django/orpheus/lib/python3.10/site-packages/dbbackup/db/postgresql.py", line 124, in _restore_dump
stdout, stderr = self.run_command(cmd, stdin=dump, env=self.restore_env)
File "/home/fxw/Documents/Orpheus/django/orpheus/lib/python3.10/site-packages/dbbackup/db/base.py", line 171, in run_command
raise exceptions.CommandConnectorError(
dbbackup.db.exceptions.CommandConnectorError: Error running: pg_restore --dbname=postgresql://XXXXXX:XXXXX-G-6iXeiJ@localhost/XXXXXX --single-transaction --clean
pg_restore: error: input file appears to be a text format dump. Please use psql.
CC: @MaxTechCode
Metadata
Metadata
Assignees
Labels
No labels