将 Discourse 网站迁移到另一个 VPS 使用 rsync

I just want to reiterate that --numeric-ids is 100% mandatory when rsync’ing to a new server. If you don’t, rsync will try to make usernames match up between the hosts, which will change file ownership inside of Docker. This is going to have you rolling through a million error messages to find out the first failure was Postgres refusing to start because it no longer owns a file it thinks it should, but then tons of other havoc will follow (Redis will try to bind a TCP port that it’s already listening on, dogs and cats living together, etc), making it hard to diagnose the issue.

Also, it’s absolutely terrifying that actual backups made by Discourse, to run inside of a Docker container completely controlled by Discourse, MAY NOT WORK, and apparently have failures going back for years, apparently unaddressed, which is why I came to rsync to migrate to new hardware. Rsync got it done, and now it’s sitting on a mirrored ZFS filesystem with hourly snapshots and a remote backup made daily, which is great…but I do worry for all the admins out there that think the automatic backup from Discourse will save them in a disaster and are going to be scratching their heads about corrupt SQL indexes, and what plugins they were running, when they try to use it.