Move a Discourse site to another VPS with rsync

I’m not sure that’s true or sure that it always works. At some point, I think, the user and or group IDs inside the docker container changed. I’m willing to give –numberic-ids a try, though.

For the new server migrations I do, I’ve been skipping postgres files like this:

cd /var/discourse
rsync -rav --numeric-ids =old_ip=:/var/discourse/containers/ /var/discourse/containers/
rsync -rav --numeric-ids =old_ip=:/var/discourse/shared/ /var/discourse/shared/ --exclude log --exclude postgres_* --exclude redis_data --exclude log --exclude tmp --exclude state

and restoring a backup to the new machine.

Yeah. The corrupt index issue can be a real bear. I don’t think I’ve seen one in a good while, though.

Yes, but (I think) they also see that things are unique and the corrupt index will let you have multiple records with what is supposed to be a unique value. It’s for stuff like tracking link clicks, so it’s not especially critical if it’s wrong.

I think I’ve paid closer attention to this than you have and the above pretty much sums up my understanding as well. :person_shrugging: Maybe the problem was with PG12? That could explain why I haven’t seen the problem in a long while, but I don’t pretend to remember, if I ever knew for sure.

1 Like