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

Change etcd to external db #4046

Closed
jbpoint opened this issue Sep 18, 2021 · 8 comments
Closed

Change etcd to external db #4046

jbpoint opened this issue Sep 18, 2021 · 8 comments

Comments

@jbpoint
Copy link

jbpoint commented Sep 18, 2021

Hi,

is there an easy way to change the datastore option from etcd to an external database without loosing any data?

Thanks

@brandond
Copy link
Member

We recently added support for migration from sqlite to etcd; this is currently the only supported path.

@werdnum
Copy link

werdnum commented Feb 3, 2022

We recently added support for migration from sqlite to etcd; this is currently the only supported path.

Is there any info anywhere on how to do that? I didn't find anything in the documentation.

@brandond
Copy link
Member

brandond commented Feb 3, 2022

Just add --cluster-init to the flags of the server. If you're using systemd, you can edit the unit to add the flag, and then reload/restart.

@werdnum
Copy link

werdnum commented Jan 20, 2023

Any updates on this? I migrated my data store to the embedded etcd for the native backups, but my hardware can't support the I/O requirements of etcd and I'd like to migrate back to a traditional database.

@brandond
Copy link
Member

Only sqlite -> etcd is supported, not etcd back to sqlite.

@Serverfrog
Copy link

Nice, so Documented is that SQLite is the default, and here is that the it migrates from SQLite to external etcd.
So i restart with systemd with --cluster-init and the datastore-endpoint...

Now i have an empty cluster...

@brandond
Copy link
Member

So i restart with systemd with --cluster-init and the datastore-endpoint...

No, don't do that.

--cluster-init starts a new embedded etcd instance, and will copy over data from sqlite, if any is present.

--datastore-endpoint overrides the embedded etcd instance, and points at the requested datastore, without enabling any migration.

Don't use both together, it won't do what you want.

@Serverfrog
Copy link

So what would be the migration way to migrate from internal SQLite to external etcd?
Because i want to switch out the Main node (due to the fact i want to transfer them from a VM to an LXC due to PCI devices)

Or is it only possible to migrate from an Internal SQLite to an internal etcd?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants