Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Removed translated content for 'zh'
Sv translation
languageen

(info)  Preface

     Sometimes 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 data

            (lightbulb)Example: 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 complex

            Use BellaDati     icon stop server

            (info)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.

 (info) 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:

 

(info)  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 permissions

           See 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.

          (info) 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 application

            We 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 BellaDati 

            use your browser window and insert   http://localhost:8080/login

            check you are able to see your data as before

 

(info)  Conclusion

           BellaDati 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
languageja

(info)  はじめに

 「組み込み」データベースを使用してBellaDatiをインストールした後、データベースデータ用にさらに多くのスペースが必要になる場合があります。次の手順では、大容量のディスクを準備できる新しいドライブにデータを移動する方法をいくつかの手順で説明します。

(以下のテキストは次のリンク先に基づいています
 https://wiki.postgresql.org/wiki/Change_the_default_PGDATA_directory_on_Windows)

Step 1: データベースクラスタデータ用の新しいドライブと新しいディレクトリを選択します

(lightbulb) 例: 現在の場所 C:\Program Files\BellaDati\pgsql\data

  Drive D:\ は、将来のBellaDatiの活用に適しています(ディスクははるかに大きい)

  ディレクトリデータ全体を新しい場所 D:\pgsql\data に移動します       

Step 2: BellaDatiアプリケーションコンプレックスの実行を停止します

BellaDati Stop server アイコンを使用します

(info) このアクションにより、BellaDatiコンプレックスが停止します。つまり、アプリケーションサーバー GlassFish とアプリケーション BellaDati がデプロイされ、PostgreSQL データベースクラスターが実行されます。

Windowsタスクマネージャーを確認します : [スタート]-> [設定]-> [コントロールパネル]-> [管理ツール]-> [サービス]
これは、BellaDatiとBellaDati-pgsqlの両方が現在停止していることを示しています:

             


Step 3: レジストリ値の変更

Windowsレジストリエディタ (regedit.exe) を起動し、"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\pgsql-some version" に移動します。

            

           

    

"ImagePath" をダブルクリックし、"–D" オプションの後のディレクトリを新しい場所に変更します。

(info) 新しい場所へのパスにスペースが含まれている場合は、引用符で囲む必要があります。

この例では、以前のパス C:\Program Files\BellaDati\pgsql\data が、新しいパス D:\pgsql\data に変更されています。


   


編集後に画像パスを探します:

(info) 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サービス管理ウィンドウを閉じてから再度開きます

(info) これにより、システムを再起動しなくても、レジストリで変更したパスが更新されます。

[サービス管理]ウィンドウを閉じて再度開いた後、PostgreSQL Database service "path to executable(実行可能ファイルへのパス)" 情報を確認する必要があります。"–D" オプションの後のパスは、新しいディレクトリを指しているはずです。

PGD​​ATAディレクトリが再配置され、レジストリのサービス起動パラメータが変更されたので、先に進んでサービスを開始できます。

Step 7: アプリケーションを起動します           

BellaDati Start server アイコンを使用します

Windowsタスクマネージャーを確認します : [スタート]-> [設定]-> [コントロールパネル]-> [管理ツール]-> [サービス]

BellaDatiとBellaDati-pgsqlの両方が現在実行されていることを示しています:           

           

Step 8: BellaDati へのログイン

ブラウザを使用して入力します   http://localhost:8080/login

以前と同じようにデータを表示できることを確認してください

(info)  結論

BellaDatiアプリケーションコンプレックスは、ドライブ D:\ psql\data でデータを検索します。

C:\Program Files\Belladati\pgsql\data は、アプリケーションの実行には必要ありません。