pgloader icon indicating copy to clipboard operation
pgloader copied to clipboard

[Import Issue] NOTADB: file is not a database or READONLY: attempt to write a readonly database

Open Ayymoss opened this issue 3 years ago • 0 comments

pgloader version "3.6.3~devel"
compiled with SBCL 1.4.16.debian
  • [No] did you test a fresh compile from the source tree?

  • [Yes] did you search for other similar issues?

pgloader --type sqlite db.sqlite postgresql:///IW4MAdminTest

2022-08-25T20:24:14.008000Z LOG pgloader version "3.6.3~devel"
2022-08-25T20:24:14.022000Z LOG Migrating from #<SQLITE-CONNECTION sqlite:///opt/db.sqlite {1005D666B3}>
2022-08-25T20:24:14.022000Z LOG Migrating into #<PGSQL-CONNECTION pgsql://postgres@UNIX:5432/IW4MAdminTest {1005EAEFB3}>
2022-08-25T20:24:14.032000Z ERROR sqlite: Failed to open sqlite file #P"/opt/db.sqlite": Could not prepare an sqlite statement.
Code NOTADB: file is not a database.
Database: /opt/db.sqlite
SQL: SELECT tbl_name
  FROM sqlite_master
 WHERE tbl_name = 'sqlite_sequence'
2022-08-25T20:24:14.033000Z LOG report summary reset
       table name     errors       rows      bytes      total time
-----------------  ---------  ---------  ---------  --------------
            fetch          0          0                     0.000s
  fetch meta data          0          0                     0.000s
-----------------  ---------  ---------  ---------  --------------
-----------------  ---------  ---------  ---------  --------------

Other commands I've ran, tried directly from DB, from file etc...

51  pgloader db.load
52  pgloader Database.db postgresql:///IW4MAdminTest
53  pgloader db.sqlite postgresql:///IW4MAdminTest
54  pgloader --type sqlite db.sqlite postgresql:///IW4MAdminTest

If I try load from Database directly I get Code READONLY: attempt to write a readonly database.

From the db.load file

LOAD DATABASE
       FROM sqlite:///opt/db.sqlite
       INTO postgresql:///IW4MAdminTest;

There's no winning...

Ayymoss avatar Aug 25 '22 20:08 Ayymoss