You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(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.
To complement. I confirm the problem. I have backup files from a system running the following:
Django 3.2.9
django-dbbackup 3.3
backend database: postgres
The dump file generated by dbbackup are compressed text files *.psql.gz
The upgraded system running the following:
Django==4.2.7
django-dbbackup==4.0.2
Without changes in the configuration, the dump files generated by dbbackup are now binary compressed files *.psql.bin.gz
I can import the bin.gz files, but I'm unable to import the text dumps generated with the previous version.
The solution is given in #456, to set this configuration in settings.py to override the default config of dbbackup.
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
andCC: @MaxTechCode
The text was updated successfully, but these errors were encountered: