this post was submitted on 06 Jun 2024
15 points (94.1% liked)

Lemmy

12440 readers
2 users here now

Everything about Lemmy; bugs, gripes, praises, and advocacy.

For discussion about the lemmy.ml instance, go to !meta@lemmy.ml.

founded 4 years ago
MODERATORS
 

I host my own Lemmy instance and have a user account on it that I use everywhere (I don't host local communities, I just use it as a home for my Lemmy user account). I needed to re-home my Lemmy server, and though it's a docker installation, copying the /var/lib/docker/volumes/lemmy_* directories to the new installation didn't work. So I created a new Lemmy server.

How can I move my old account to the new server, so I can keep all my subscriptions and post/comment history?

top 16 comments
sorted by: hot top controversial new old
[–] tobogganablaze@lemmus.org 9 points 3 months ago* (last edited 3 months ago) (1 children)

There is no way to migrate an account and keep post and comment history.

But you can export/import your subscriptions, blocks and general settings.

[–] iso@lemy.lol 6 points 3 months ago* (last edited 3 months ago) (2 children)

I don't recommend re-installing an instance on the same domain. This caused me errors before I had to replace my domain. Like I couldn't subscribe to same communities with my old username. If you have the old data, you should find a way to extract it.

Which method did you used to install your instance? If you used lemmy-ansible, then your data should be in /srv/lemmy by default: https://github.com/LemmyNet/lemmy-ansible/blob/8c5337f5e5163c2452242db578119593d6fa00f1/examples/hosts#L13

[–] andrew_s@piefed.social 5 points 3 months ago (1 children)

I've had that problem too (messing around with test instances) - for anyone else wondering why: it's because the RSA keypair for me@mydomain has changed, and remote instances fail to validate message headers signed with the new private key, because they're still using their copy of an old public key.

[–] nutomic@lemmy.ml 3 points 3 months ago

The key is refreshed after 24 hours so it will work if you wait a bit.

[–] mike_wooskey@lemmy.d.thewooskeys.com 2 points 3 months ago (1 children)

Thanks for the assistance, @iso@lemy.lol.

My new server uses a new domain. I do still have the old data (in fact, the old server is still up - that's where I'm posting this from).

I installed both Lemmy servers via Docker. It would be nice if I could rsync my account data (including post/comment history) from the old server to the new server, but I'm now wondering if my changing domains would make the old account not work at all in the new server.

[–] iso@lemy.lol 3 points 3 months ago (1 children)

If you're not using the old domain then it would broke federation: https://join-lemmy.org/docs/administration/backup_and_restore.html?highlight=changing#changing-your-domain-name

I guess there is no way to move your post/comment history to a new domain. It's like if you change your domain then you can't use old DB and if you don't change it then you can't re-install with fresh DB :)

[–] pe1uca@lemmy.pe1uca.dev 4 points 3 months ago* (last edited 3 months ago) (1 children)

Do you still have the old database? You should be able to move your instance around as long as you have a dump of your DB, that's where all the keys of each community and user in your instance are. Those are the ones telling other instances you're actually you, if you loose those I don't know what can be done so other instances flush your old content and treat you as a new account. But I would count on thi s being a feature since it could lead to people impersonating someone else if they get a hold of the domain without the DB.

EDIT: amm, maybe I didn't understand correctly, are you trying to move to a new domain? Or to a new server with the same domain?
What's re-home?

[–] mike_wooskey@lemmy.d.thewooskeys.com 1 points 3 months ago (1 children)

Thanks for the help, @pe1uca@lemmy.pe1uca.dev.

I do still have my old server (I'm posting this from it). The new Lemmy server is using a different domain.

[–] pe1uca@lemmy.pe1uca.dev 2 points 3 months ago (1 children)

Ah, then no, the last thing I knew about it you can't migrate accounts from one server to another, which is what you're trying to do here.
As I mentioned if you were able to move the keys which identify your account it would be easy for someone to impersonate you.
Also, your public keys are shared among all the instances you've interacted, so this might break your interactions there.

[–] hellofriend@lemmy.world 2 points 3 months ago

I like your 404 pages

[–] willya@lemmyf.uk 2 points 3 months ago (1 children)

Scroll to the bottom of your settings page in the Lemmy UI. The import/export settings are there.

[–] mike_wooskey@lemmy.d.thewooskeys.com 1 points 3 months ago (1 children)

I see the import/export settings in my new server (0.19.3) but not in my old server (0.18.3). But it sounds like exported account settings don't include post/comment history. Thanks, though, @willya@lemmyf.uk.

[–] willya@lemmyf.uk 1 points 3 months ago

Yeah sorry I must have skimmed right over that. This is only possible backing up everything and reusing all the data while also using the same domain. When I upgraded servers I just cloned the drives then swapped my domains to the new IP.