CTFd / CTFd

CTFs as you need them

Home Page:https://ctfd.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can not import when backup in CTFd Version 3.6

N1GHT-F4LL opened this issue · comments

Environment:

  • CTFd Version/Commit: 3.6
  • Operating System: Ubuntu 22.04.3 LTS
  • Web Browser and Version: Google Chrome Version 118.0.5993.120 (Official Version) (64 bit)

What happened?

Have Error in Backup and Import tool.

What did you expect to happen?

I want to be able to use the backup and import tool to back up and restore to a new server

How to reproduce your issue

Today I deployed to server A and backed up with the Export tool at /admin/config and Backup with Export tab, then because of some SSL issues, I deployed server B in the same session (almost The environments of the two servers are no different, with the same Environment as I declared above. Then I used the Import Tool on server B and I saw the word Upload appear and stay there for a while. For a while. After I didn't see any changes, I checked the log and discovered the Log I provided above.

Any associated stack traces or error logs

INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
 * Loaded module, <module 'CTFd.plugins.challenges' from '/opt/CTFd/CTFd/plugins/challenges/__init__.py'>
 * Loaded module, <module 'CTFd.plugins.dynamic_challenges' from '/opt/CTFd/CTFd/plugins/dynamic_challenges/__init__.py'>
 * Loaded module, <module 'CTFd.plugins.flags' from '/opt/CTFd/CTFd/plugins/flags/__init__.py'>
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
 * Loaded module, <module 'CTFd.plugins.challenges' from '/opt/CTFd/CTFd/plugins/challenges/__init__.py'>
 * Loaded module, <module 'CTFd.plugins.dynamic_challenges' from '/opt/CTFd/CTFd/plugins/dynamic_challenges/__init__.py'>
 * Loaded module, <module 'CTFd.plugins.flags' from '/opt/CTFd/CTFd/plugins/flags/__init__.py'>
Exception: Importing not currently supported for SQLite databases. See Github issue #1988.
Import Failure: Importing not currently supported for SQLite databases. See Github issue #1988.
1699038641
Deleting /tmp/tmpw1ycj1jv

afaik this is a sqlite related issue. It might work better if you restore in an installation with Mariadb running.

I'm not sure, but after a few attempts to reinstall CTFd I was able to restore everything