AlloyDB Omni memiliki file konfigurasi default bernama
dataplane.conf yang ada di direktori /var/alloydb/config.
Untuk mengubah lokasi direktori data server, perbarui variabel DATADIR_PATH di file dataplane.conf.
Untuk mengupdate variabel DATADIR_PATH di dataplane.conf, jalankan
perintah berikut:
Penginstal AlloyDB Omni mengisi kedua file ini dengan
nilai default untuk membantu Anda memulai. Anda dapat memperbarui kedua file tersebut dengan cara apa pun yang sesuai dengan kebutuhan Anda.
Kubernetes
Anda mengonfigurasi dan mengontrol cluster database AlloyDB Omni berbasis Kubernetes dengan menyandingkan file manifes deklaratif dengan utilitas kubectl, seperti deployment berbasis Kubernetes lainnya.
Beberapa resource yang dapat Anda konfigurasi adalah:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-04 UTC."],[[["\u003cp\u003eAlloyDB Omni's default configuration file, \u003ccode\u003edataplane.conf\u003c/code\u003e, located in \u003ccode\u003e/var/alloydb/config\u003c/code\u003e, allows users to change the server's data directory location by updating the \u003ccode\u003eDATADIR_PATH\u003c/code\u003e variable.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edataplane.conf\u003c/code\u003e file can be updated using the \u003ccode\u003esed\u003c/code\u003e command or a text editor, ensuring that \u003ccode\u003eDATADIR_PATH\u003c/code\u003e points to the directory containing the \u003ccode\u003edata\u003c/code\u003e subdirectory.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e/var/alloydb/config\u003c/code\u003e directory also contains standard PostgreSQL configuration files, \u003ccode\u003epostgresql.conf\u003c/code\u003e and \u003ccode\u003epg_hba.conf\u003c/code\u003e, which can be modified to suit specific needs, but only these originals should be edited, not the runtime copies.\u003c/p\u003e\n"],["\u003cp\u003eFor Kubernetes-based deployments, AlloyDB Omni is managed using declarative manifest files and the \u003ccode\u003ekubectl\u003c/code\u003e utility, similar to other Kubernetes deployments.\u003c/p\u003e\n"]]],[],null,["# Configure AlloyDB Omni\n\nSelect a documentation version: 15.5.2keyboard_arrow_down\n\n- [Current (16.8.0)](/alloydb/omni/current/docs/configure-omni)\n- [16.8.0](/alloydb/omni/16.8.0/docs/configure-omni)\n- [16.3.0](/alloydb/omni/16.3.0/docs/configure-omni)\n- [15.12.0](/alloydb/omni/15.12.0/docs/configure-omni)\n- [15.7.1](/alloydb/omni/15.7.1/docs/configure-omni)\n- [15.7.0](/alloydb/omni/15.7.0/docs/configure-omni)\n- [15.5.5](/alloydb/omni/15.5.5/docs/configure-omni)\n- [15.5.4](/alloydb/omni/15.5.4/docs/configure-omni)\n- [15.5.2](/alloydb/omni/15.5.2/docs/configure-omni)\n\n\u003cbr /\u003e\n\nThis page shows how to configure AlloyDB Omni after you have [installed it](/alloydb/omni/15.5.2/docs/install).\n\n\u003cbr /\u003e\n\n### Single-server\n\n#### Change your data directory location\n\nAlloyDB Omni has a default configuration file named\n`dataplane.conf` that's present in the `/var/alloydb/config` directory.\nTo change your server's data directory location, update the `DATADIR_PATH` variable in the `dataplane.conf` file.\n\nTo update the `DATADIR_PATH` variable in `dataplane.conf`, run the\nfollowing command: \n\n sudo sed -i \"s|^\\(DATADIR_PATH=\\).*|\\1\u003cvar translate=\"no\"\u003eDATA_DIRECTORY\u003c/var\u003e|\" /var/alloydb/config/dataplane.conf\n\nReplace \u003cvar translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003eDATA_DIRECTORY\u003c/code\u003e\u003c/var\u003e with the full\nfile system path to the existing directory that you want to contain\nyour AlloyDB Omni installation.\n\nAlternately, use a text editor to open `dataplane.conf` and update the\nvalue of the `DATADIR_PATH` directive.\n| **Note:** Set the value of `DATADIR_PATH` to the directory that contains the `data` subdirectory---for example, `$HOME/alloydb` and not `$HOME/alloydb/data`.\n\n#### Configure other server options\n\nThe `/var/alloydb/config` directory also contains the following two standard\nPostgreSQL configuration files:\n\n- [`postgresql.conf`](https://www.postgresql.org/docs/current/config-setting.html)\n- [`pg_hba.conf`](https://www.postgresql.org/docs/15/auth-pg-hba-conf.html)\n\nThe AlloyDB Omni installer populates both of these files with\ndefault values to get you started. You can update both files in whatever\nway is appropriate for your own needs.\n| **Caution:** AlloyDB Omni copies these files into your data directory for its own runtime use. Edit only the files in `/var/alloydb/config`, and not the copies in your data directory. Otherwise, any changes you make to those files risk being overwritten.\n\n### Kubernetes\n\nYou configure and control a Kubernetes-based AlloyDB Omni database\ncluster by pairing declarative manifest files with the `kubectl` utility, just\nlike any other Kubernetes-based deployment.\n\nSome resources that you can configure are:\n\n- [Manage backup and restore](/alloydb/omni/15.5.2/docs/backup-kubernetes)\n- [Create read pool instance in Kubernetes](/alloydb/omni/15.5.2/docs/kubernetes-read-pool)\n- [Use a sidecar container in Kubernetes](/alloydb/omni/15.5.2/docs/kubernetes-sidecar-container)\n\nWhat's next\n-----------\n\n- [Run and connect to AlloyDB Omni](/alloydb/omni/15.5.2/docs/run-connect)\n\n- [Manage AlloyDB Omni](/alloydb/omni/15.5.2/docs/manage)\n\n- [Create a read-only replica](/alloydb/omni/15.5.2/docs/set-up-read-replica)"]]