Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DB Migration *to* SQLite? #12245

Closed
cyphar opened this issue Nov 4, 2018 · 7 comments
Closed

DB Migration *to* SQLite? #12245

cyphar opened this issue Nov 4, 2018 · 7 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement feature: occ Nice to have

Comments

@cyphar
Copy link
Member

cyphar commented Nov 4, 2018

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?

@nextcloud-bot
Copy link
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).

@madmax2012
Copy link

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

@cyphar
Copy link
Member Author

cyphar commented Nov 4, 2018

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.

@skjnldsv skjnldsv added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Aug 20, 2020
@szaimen
Copy link
Contributor

szaimen commented Jun 9, 2021

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.

@kuflierl
Copy link

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?

@mikrofyr
Copy link

mikrofyr commented Feb 8, 2024

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

@reeno
Copy link

reeno commented Aug 19, 2024

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
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement feature: occ Nice to have
Projects
None yet
Development

No branches or pull requests

8 participants