“Finnegans Wake is the greatest guidebook to media study ever fashioned by man.” - Marshall McLuhan, Newsweek Magazine, page 56, February 28, 1966.
I have never done LSD or any other illegal drugs, but I have read FInnegans Wake: www.LazyWake.com
Lemmy tester, “RocketDerp” is my username on GitHub
If you truly start your site over with empty database… your post and comment id numbers and other things will clash… which kind of creates a mess. And obviously user accounts all have to be re-created. Sorry you ran into this mess.
ok, I’m not that great with grep, I suppose we could tell it to use only lines that start with 1 etc.
You seem willing to start over. You are now on PostgreSQL15.3 and Lemmy 0.18.4 - so it’s up to you.
do the same grep on our prior backup file, the one from PostgreSQL 13… with the same output concern.
Well, I’m at a loss. I never actually did a failed upgrade from 13, and I don’t know exactly what it fails on, etc. I just did a upgrade from 14 to 15 before I went with 0.18.4 - so I knew the upgrade procedure. But I didn’t expect you would be in a damaged state where it had you as a new instance.
Going back to the output you got… line one, what are the dates you see?
COPY public.site (id, name, sidebar, published, updated, icon, banner, description, actor_id, last_refreshed_at, inbox_url, private_key, public_key, instance_id) FROM stdin;
1 lemmy-gamma \N 2023-08-16 21:42:52.88018 2023-08-16 21:47:45.32338
well, now my theory is that your site was broken with the 0.18.4 upgrade somehow. And that the PostgreSQL 13 database wouldn’t even work with 0.18.2
We could confirm this by you compiling with Rust the 0.18.2 and using it with your PostgreSQL 13 and see if it works like before you ever upgraded…
But the migrations may have already made the database incompatible. But I think it has a down.sql to go back… also for sake of clarity: Do you have a backup before you upgraded to 0.18.4 ?
so grep isn’t finding multiples… so my idea that somehow a different database name got picked form URL vs. lemmy.json isn’t panning out.
ok, so, there is another possibility I hadn’t thought about…
That this broken-state of “thinks it is new site” existed before we ever backed up your PostgreSQL 13 data.
Do you still have your lemmy_server binary from version 0.18.2 that did work with postgreSQL 13?
Ok, so what you are looking for is up to this point, especially the line starting with '1"
COPY public.site (id, name, sidebar, published, updated, icon, banner, description, actor_id, last_refreshed_at, inbox_url, private_key, public_key, instance_id) FROM stdin;
1 lemmy-gamma \N 2023-08-16 21:42:52.88018 2023-08-16 21:47:45.32338 \N \N \N http://lemmy-gamma:8561/ 2023-08-16 21:42:52.877719http://lemmy-gamma:8561/site_inbox -----BEGIN PRIVATE KEY-----\n
I only see a single Database in there, I think template1 and postgres are both there by default. I wonder if showhow the postgres one was used…
Ok, i came up with a useful grep, do you get two results and what can you describe as different between them?
grep --after-context=6 "Data for Name: site; Type: TABLE DATA;" lemmy_databackup_2.sql
Let’s start a new comment trunk branch…
We were doing grep
yha, I think that’s the problem… you have two installs, but we need to figure out their names
we could grep for "-- Database " and see if it gives you two names…
ok, this grep might be of use:
grep --after-context=6 "Data for Name: local_site; Type: TABLE DATA;" lemmy_databackup_2.sql
I’m not sure if there is anything sensitive in that output… but I think it will be revealing how many matches you get.
the name, and another one of those sections.
pretty much, unless you have other ideas. you could download the file and edit locally too…
well the size is about the same, 55M vs 54M, so the restore worked.
We need to study what is in this file and try to make sense of how there are two Lemmy databases in there. What you are looking for is sections like this:
--
-- Database "lemmy" dump
--
--
-- PostgreSQL database dump
--
We are looking for different names or something, because somehow you have one with only a few communities and messages, another with far more.
on, sorry, and REMOVE the “lemmy” after the 5433 port
I can understand. Best of luck on what you do next.