「Discourse 3.5.0.beta9-dev - 04dbc622ab1e0197d16703ba47cf005ec93697ee」から現在(6f06709643fa5e2253606c46f79d089ca3393ac9)へのリストアに問題があります。
[STARTED]
'system' has started the restore!
Marking restore as running...
Making sure /home/pfaffman/src/discourse-repos/discourse/tmp/restores/default/2025-10-28-201139 exists...
Downloading archive to tmp directory...
Extracting dump file...
Validating metadata...
Current version: 20251024020353
Restored version: 20250724012518
Enabling readonly mode...
Pausing sidekiq...
Waiting up to 60 seconds for Sidekiq to finish running jobs...
Creating missing functions in the discourse_functions schema...
Restoring dump file... (this may take a while)
invalid command \restrict
EXCEPTION: psql failed: invalid command \restrict
データベースリストアラーからこれらの printf コマンドを削除すると、機能します。
<<~CMD
(
printf '%s\n' "\\\restrict #{nonce}"
#{sed_command}
printf '%s\n' "\\\unrestrict #{nonce}"
) | #{self.class.psql_command} 2>&1
CMD
これはこのコミットのようです。
バックアップが作成されたバージョン(cdck Dockerコンテナ)では、次のようになっています。
PostgreSQL 15.13 (Debian 15.13-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
そして、ここでリストアを試みています(ベアメタルでpg15を実行している開発サイト)。
PostgreSQL 15.13 (Ubuntu 15.13-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit
このコードが何をしようとしているのか理解できないため、混乱しています。