mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-05-16 08:40:25 +00:00
Updated tools.func (markdown)
parent
eef2736248
commit
02d742e393
@ -46,5 +46,34 @@ If the requested module version is already installed, it is skipped.
|
||||
Modules are updated if the installed version does not match the requested one (unless latest is used).
|
||||
On failure, the script exits with exit 1.
|
||||
|
||||
## 🐘 `install_postgresql`
|
||||
|
||||
### Overview
|
||||
|
||||
This function installs or upgrades to a specified version of PostgreSQL. It handles backups, repository configuration, and service restarts automatically.
|
||||
|
||||
### Usage
|
||||
|
||||
```bash
|
||||
# Install default PostgreSQL version
|
||||
install_postgresql
|
||||
|
||||
# Install a specific version
|
||||
PG_VERSION=15 install_postgresql
|
||||
```
|
||||
|
||||
### User-Configurable Variables
|
||||
|
||||
| Variable | Description | Default Value |
|
||||
|--------------|-----------------------------------------------------------------------------|---------------|
|
||||
| `PG_VERSION` | Specifies the major version of PostgreSQL to install or upgrade to (e.g., `14`, `15`, `16`). | `16` |
|
||||
|
||||
### Behavior
|
||||
|
||||
- Backs up databases if an existing installation is detected.
|
||||
- Installs the required version of PostgreSQL using the PGDG APT repo.
|
||||
- Restores the database after upgrade if applicable.
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user