Page History
Sv translation | ||
---|---|---|
| ||
PrefaceSometimes after BellaDati installation with "built in" database we need more space for database data.The next procedure describes in several steps HOW to MOVE data to NEW DRIVE , where disk with bigger capacity is ready. (The text below is based on https://wiki.postgresql.org/wiki/Change_the_default_PGDATA_directory_on_Windows)
Step 1: Select the new drive and new directory for database cluster dataExample: current location is C:\Program Files\BellaDati\pgsql\data Drive D:\ is more suitable for our future BellaDati exploitation (disk is much more bigger ...) We have decided to move the whole directory data to new location D:\pgsql\data
Step 2: Stopping running BellaDati application complexUse BellaDati icon stop server The action will stop BellaDati complex i.e. both application server GlassFish with deployed application BellaDati and running PostgreSQL database cluster Check Windows task manager : Start->Settings->Control Panel->Administrative Tools->Services It shows both BellaDati and BellaDati-pgsql are stopped now:
Step 3: Change Registry Values
Start the Windows Registry Editor (regedit.exe) and navigate to: "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\pgsql-some version".
Double click on "ImagePath" and change the directory after the "–D" option to your new location. If the path to your new location contains spaces, you should then enclose it with quotes. In our example, former path C:\Program Files\BellaDati\pgsql\data is changed into new path D:\pgsql\data
Look for image path after editing:
pg_ctl.exe start/stop/reload postgresql database cluster . The command location is not changed, all settings in BellaDati complex stay. We can see, the port where postgresql is listening 5439, we can see new location for cluster data D:\pgsql\data.
Step 4: Moving current PGDATA directory to the newly specified directory.This is about copy files from directory C:\Program Files\BellaDati\pgsql\data directory D:\pgsql\data. Please note that you should do this as Administrator on server machines. Step 5: Check / modify user permissionsSee permissions to old C:\ ...\data files (who can do what) Check the same in the new directory and if needed, modify to ensure the username under which your PostgreSQL instance runs has permissions to do so in the new directory, otherwise it will not start
Step 6: Close and re-open the Windows Services Management window.This refreshes the path you just changed in the registry without the need to restart your system. After closing and re-opening the Services Management window, you should check the "path to executable" information of the PostgreSQL Database service. The path after "–D" option should be pointing to your new directory now. Now that the PGDATA directory has been re-located and the service startup parameter in the registry has been modified, you can go ahead and start the service
Step 7: Start applicationWe use icon BellaDati Start server Checking Windows task manager : Start->Settings->Control Panel->Administrative Tools->Services shows both BellaDati and BellaDati-pgsql are running now:
Step 8: Loging to BellaDatiuse your browser window and insert http://localhost:8080/login check you are able to see your data as before
ConclusionBellaDati application complex looks for data on drive D:\ psql\data now C:\Program Files\Belladati\pgsql\data is not needed for application run.
|
Sv translation | ||
---|---|---|
| ||
はじめに「組み込み」データベースを使用してBellaDatiをインストールした後、データベースデータ用にさらに多くのスペースが必要になる場合があります。次の手順では、大容量のディスクを準備できる新しいドライブにデータを移動する方法をいくつかの手順で説明します。 (以下のテキストは次のリンク先に基づいています Step 1: データベースクラスタデータ用の新しいドライブと新しいディレクトリを選択します例: 現在の場所 C:\Program Files\BellaDati\pgsql\data Drive D:\ は、将来のBellaDatiの活用に適しています(ディスクははるかに大きい) ディレクトリデータ全体を新しい場所 D:\pgsql\data に移動します Step 2: BellaDatiアプリケーションコンプレックスの実行を停止しますBellaDati Stop server アイコンを使用します このアクションにより、BellaDatiコンプレックスが停止します。つまり、アプリケーションサーバー GlassFish とアプリケーション BellaDati がデプロイされ、PostgreSQL データベースクラスターが実行されます。 Windowsタスクマネージャーを確認します : [スタート]-> [設定]-> [コントロールパネル]-> [管理ツール]-> [サービス]
Step 3: レジストリ値の変更Windowsレジストリエディタ (regedit.exe) を起動し、"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\pgsql-some version" に移動します。
"ImagePath" をダブルクリックし、"–D" オプションの後のディレクトリを新しい場所に変更します。 新しい場所へのパスにスペースが含まれている場合は、引用符で囲む必要があります。 この例では、以前のパス C:\Program Files\BellaDati\pgsql\data が、新しいパス D:\pgsql\data に変更されています。
編集後に画像パスを探します: pg_ctl.exe は、postgresql データベースクラスターを開始/停止/再読み込みします。コマンドの場所は変更されず、BellaDatiコンプレックスのすべての設定が維持されます。postgresql が5439をリスニングしているポートを確認できます。クラスターデータ D:\pgsql\data の新しい場所を確認できます。 Step 4: 現在のPGDATAディレクトリを、新しく指定されたディレクトリに移動しますこれは、C:\Program Files\BellaDati\pgsql\data ディレクトリ、D:\pgsql\data ディレクトリからファイルをコピーすることについてです。 サーバーマシンの管理者としてこれを行う必要があることに注意してください。 Step 5: ユーザー権限を確認/変更します古い C:\ ...\data ファイルへのアクセス許可を参照してください(誰が何をできるか) 新しいディレクトリで同じことを確認し、必要に応じて、PostgreSQLインスタンスを実行するユーザー名に、新しいディレクトリで実行する権限があることを確認します。そうしないと起動しません。 Step 6: Windowsサービス管理ウィンドウを閉じてから再度開きますこれにより、システムを再起動しなくても、レジストリで変更したパスが更新されます。 [サービス管理]ウィンドウを閉じて再度開いた後、PostgreSQL Database service の "path to executable(実行可能ファイルへのパス)" 情報を確認する必要があります。"–D" オプションの後のパスは、新しいディレクトリを指しているはずです。 PGDATAディレクトリが再配置され、レジストリのサービス起動パラメータが変更されたので、先に進んでサービスを開始できます。 Step 7: アプリケーションを起動しますBellaDati Start server アイコンを使用します Windowsタスクマネージャーを確認します : [スタート]-> [設定]-> [コントロールパネル]-> [管理ツール]-> [サービス] BellaDatiとBellaDati-pgsqlの両方が現在実行されていることを示しています:
Step 8: BellaDati へのログインブラウザを使用して入力します http://localhost:8080/login 以前と同じようにデータを表示できることを確認してください 結論BellaDatiアプリケーションコンプレックスは、ドライブ D:\ psql\data でデータを検索します。 C:\Program Files\Belladati\pgsql\data は、アプリケーションの実行には必要ありません。 |