Adobe Commerce:設定ファイルが見つからないか、変更されています
この記事では、環境に無い設定ファイルまたは変更された設定ファイルを解決する方法について説明します。
説明 description
環境
- Adobe Commerce on cloud infrastructure
問題/症状
構成ファイル config.phpおよび/またはenv.phpが正しく変更されていないか、見つかりません。
解決策 resolution
デプロイメントプロセスでは、各設定ファイルのバックアップファイルを作成します。
app/etc/config.php.bak- システム固有の設定が含まれており、ビルド中に自動生成されます(存在しない場合)app/etc/env.php.bak– 機密性の高い設定データが含まれています
ECE-tools backup:restore コマンドを使用して復元できます。 BAK ファイルは、デプロイメントプロセスによって生成されます。 デプロイメント後に設定ファイルを手動で変更した場合、変更内容は既存のBAK ファイルに反映されません。
設定ファイルを復元するには:
-
SSHを使用してリモートリポジトリにログインします。
-
使用可能なバックアップファイルのリスト。
code language-none ./vendor/bin/ece-tools backup:listcode language-none The list of backup files: app/etc/env.php app/etc/config.php -
設定ファイルを復元します。
code language-none ./vendor/bin/ece-tools backup:restore復元の影響を受ける既存の設定ファイルのリストが表示されます。
code language-none app/etc/env.php file exists! If you want to rewrite existed files use --force app/etc/config.php file exists! If you want to rewrite existed files use --force -
すべてのファイルを上書きするには、
--forceオプションを使用します。code language-none ./vendor/bin/ece-tools backup:restore --forcecode language-none Command backup:restore with option --force will rewrite your existed files. Do you want to continue [ y/N] ?y Backup file app/etc/env.php was restored. Backup file app/etc/config.php was restored. -
オプションで、特定の設定ファイルを復元できます。
code language-none ./vendor/bin/ece-tools backup:restore --force --file=app/etc/config.phpcode language-none Command backup:restore with option --force will rewrite your existed files. Do you want to continue [ y/N] ?y Backup file app/etc/config.php was restored.
recommendation-more-help
experience-cloud-kcs-help-kbarticles