Skip to content

DB Migration *to* SQLite? #12245

Description

@cyphar

I installed Nextcloud several years ago, but made the "mistake" of picking Postgres as a database (it has weird start-up times and I'm basically the only user of my instance so it's just overkill). I would much prefer to be able to use SQLite, but it looks like occ db:convert-type only supports converting from SQLite and doesn't support converting to it.

Is this something that you'd be interested in taking a patch for?

Activity

  1. nextcloud-bot commented on Nov 4, 2018

    @nextcloud-bot
    Member

    GitMate.io thinks possibly related issues are #5155 (Migrations), #3536 (DB Migration from SQLite to PGSQL fails), #2494 (Sqlite support), #6773 (Migration overview issues), and #5099 (Failed to convert DB from sqlite to MariaDB).

  2. madmax2012 commented on Nov 4, 2018

    @madmax2012

    Hey cyphar,
    I had to do this in a different context some time back. Maybe just create a dump of your database, convert it by hand and import it as described over here?
    https://manuelvanrijn.nl/blog/2012/01/18/convert-postgresql-to-sqlite/
    Cheers, Max

  3. cyphar commented on Nov 4, 2018

    @cyphar
    Author

    That does work as a hack, and is what I was considering doing, but given that Nextcloud actually has a db:change-type command (which converts between database types by doing the conversion themselves) it seems that this is a better place to fix it.

  4. added
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    on Aug 20, 2020
  5. szaimen commented on Jun 9, 2021

    @szaimen
    Contributor

    As this sounds like a nice feature, the requests for this are quite low. Currently there are no plans to implement such a feature. Thus I will close this ticket for now. This does not mean we don't want this feature, but it is simply not on our roadmap for the near future. If somebody wants to implement this feature nevertheless we are happy to assist and help out.If you wish to have this feature implemented by the Nextcloud GmbH there is the option for consulting work on top of your Nextcloud Enterprise subscription to get your features implemented.

  6. kuflierl commented on Dec 22, 2023

    @kuflierl

    Hey cyphar, I had to do this in a different context some time back. Maybe just create a dump of your database, convert it by hand and import it as described over here? https://manuelvanrijn.nl/blog/2012/01/18/convert-postgresql-to-sqlite/ Cheers, Max

    I also need to migrate over to sqlite due to severe memory constraints. While migrating i can't seem to find where i need to put the sqlite file. I know it's somewhere in the datadirectory folder due to https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#default-config-php-examples but could you point me to where exactly?

  7. mikrofyr commented on Feb 8, 2024

    @mikrofyr

    I also want to move away from postgres. Too many problems and little value in my use case.

  8. reeno commented on Aug 19, 2024

    @reeno

    I used this script to convert from MySQL to SQLite: https://github.com/dumblob/mysql2sqlite
    Worked perfectly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions