14
submitted 1 week ago* (last edited 1 week ago) by [email protected] to c/[email protected]

I have two lemm.ee communities and I very much want to keep the post history in one community for discover ability and archival purposes.

What tools and methods are available to transfer posts from one instance to another?

top 12 comments
sorted by: hot top new old
[-] [email protected] 8 points 1 week ago* (last edited 1 week ago)

You can write a script for this:

# loop through all post
GET https://lemm.ee/api/v3/post/list?limit=50&sort=New&community_name=fedigrow&page=*page*
# take `post.ap_id` for each item
# then fetch it over activitypub on the other instance
GET https://lemmy.ml/api/v3/resolve_object?q=*urlencode post.ap_id*
# same thing for comments
GET https://lemm.ee/api/v3/comment/list?limit=50&sort=New&community_name=fedigrow&page=*page*
# again fetch
GET https://lemmy.ml/api/v3/resolve_object?q=*urlencode comment.ap_id*
[-] [email protected] 3 points 1 week ago* (last edited 1 week ago)

~~Yeah but this would only make it available on that remote instance. OP wants to transfer the community to another instance along with its posts/comments.~~

edit: misunderstood. Ignore.

[-] [email protected] 3 points 1 week ago

https://piefed.social/post/667044

Basically, find the piefed.social copy of your community and then look for the 'move to piefed.social' link in the sidebar.

[-] [email protected] 2 points 1 week ago

Time to shine for this feature

[-] [email protected] 3 points 1 week ago

Yeah, with 1700 communities on lemm.ee this will be a life saver... if we can automate the backfill.

[-] [email protected] 3 points 1 week ago

Not sure all of them are worth moving, but yeah.

[-] [email protected] 2 points 1 week ago

Thanks for this!

I've been meaning to try Piefed, but never got to it.

[-] [email protected] 2 points 1 week ago

I've been informed this community 'move to piefed' feature only works for communities that are already subscribed from a piefed user, and I don't believe the lemmy-federate bot works here.

So some elbow grease may still be required.

[-] [email protected] 2 points 1 week ago* (last edited 1 week ago)

only works for communities that are already subscribed from a piefed user, and I don't believe the lemmy-federate bot works here

@[email protected] @[email protected]

What would it take to create a "piefederate" bot?

[-] [email protected] 4 points 1 week ago* (last edited 1 week ago)

Update, so you can backfill, using

https://piefed.social/retrieve_remote_post

BUT if you want to backfill comments you need to use the comment url and not the post url

This could benefit from automation, but all the difficult parts are there.

Credit goes to Blaze they really know lemmy inside and out.

Also - If you edit a old post, that does get picked up by piefed.social even if it doesn't have the original post. so a edit does cause refederation... this works for comments too

[-] [email protected] 4 points 1 week ago

@[email protected] is working on automating the retrieval of comments, we just discussed this on the #piefed-general:matrix.org chat

[-] [email protected] 3 points 1 week ago

It's pretty easy to implement. In fact, I was working on it. But I got discouraged because of some absurd political decisions. Still open to PRs though.

this post was submitted on 04 Jun 2025
14 points (100.0% liked)

[Closed] Moved to [email protected]

1551 readers
3 users here now

This community has moved to [email protected]

Original sidebar infoTo discuss how to grow and manage communities / magazines on Lemmy, Mbin, Piefed and Sublinks

Resources:

Megathreads:

Rules:

  1. Be respectful
  2. No bigotry

founded 1 year ago
MODERATORS