---
title: Charmhub | Deploy Charmed PostgreSQL VM using Charmhub - The Open Operator
  Collection
description: Deploy the latest version of Charmed PostgreSQL VM on any cloud.
url: https://charmhub.io/test-foo-vyehgdwjgg/actions
---

# Charmed PostgreSQL VM

[Carl Csaposs](https://charmhub.io/publisher/carlcsaposs "View all packages from Carl Csaposs")

* [Carl Csaposs](https://charmhub.io/publisher/carlcsaposs "View all packages from Carl Csaposs")

Platform:

24.04

22.04

stable 57

```
juju deploy test-foo-vyehgdwjgg
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

* [create-backup](https://charmhub.io/test-foo-vyehgdwjgg/actions#create-backup)
* [create-replication](https://charmhub.io/test-foo-vyehgdwjgg/actions#create-replication)
* [force-refresh-start](https://charmhub.io/test-foo-vyehgdwjgg/actions#force-refresh-start)
* [get-primary](https://charmhub.io/test-foo-vyehgdwjgg/actions#get-primary)
* [list-backups](https://charmhub.io/test-foo-vyehgdwjgg/actions#list-backups)
* [pre-refresh-check](https://charmhub.io/test-foo-vyehgdwjgg/actions#pre-refresh-check)
* [promote-to-primary](https://charmhub.io/test-foo-vyehgdwjgg/actions#promote-to-primary)
* [restore](https://charmhub.io/test-foo-vyehgdwjgg/actions#restore)
* [resume-refresh](https://charmhub.io/test-foo-vyehgdwjgg/actions#resume-refresh)

[Learn about actions >](https://juju.is/docs/juju/action)

* create-backup

  Creates a backup to s3 storage.

  Params

  + type
    string

    The backup type, the default value is 'full'. Full backup is a full copy of all data. Differential backup is a copy only of changed data since the last full backup. Incremental backup is a copy only of changed data since the last backup (any type). Possible values - full, differential, incremental.
* create-replication

  Set up asynchronous replication between two clusters.

  Params

  + name
    string

    The name of the replication (defaults to 'default').
* force-refresh-start

  Potential of data loss and downtime

  Force refresh of first unit

  Must run with at least one of the parameters `=false`

  Params

  + check-compatibility
    boolean

    Potential of data loss and downtime

    If `false`, force refresh if new version of PostgreSQL and/or charm is not compatible with previous version
  + check-workload-container
    boolean

    Potential of data loss and downtime during and after refresh

    If `false`, allow refresh to PostgreSQL container version that has not been validated to work with the charm revision
  + run-pre-refresh-checks
    boolean

    Potential of data loss and downtime

    If `false`, force refresh if app is unhealthy or not ready to refresh (and unit status shows "Pre-refresh check failed")
* get-primary

  Get the unit which is the primary/leader in the replication.
* list-backups

  Lists backups in s3 storage.
* pre-refresh-check

  Check if charm is ready to refresh
* promote-to-primary

  Promotes the cluster of choice to a primary cluster. Must be ran against the leader unit when promoting a cluster or against the unit to be promoted within the cluster.

  Params

  + force
    boolean

    Force the promotion of a cluster when there is already a primary cluster.
  + scope
    string

    Whether to promote a unit or a cluster. Must be set to either unit or cluster.
* restore

  Restore a database backup using pgBackRest. S3 credentials are retrieved from a relation with the S3 integrator charm.

  Params

  + backup-id
    string

    A backup-id to identify the backup to restore (format = %Y-%m-%dT%H:%M:%SZ)
  + restore-to-time
    string

    Point-in-time-recovery target in PSQL format.
* resume-refresh

  Refresh next unit(s) (after you have manually verified that refreshed units are healthy)

  If the `pause-after-unit-refresh` config is set to `all`, this action will refresh the next unit.

  If `pause-after-unit-refresh` is set to `first`, this action will refresh all remaining units.
  Exception: if automatic health checks fail after a unit has refreshed, the refresh will pause.

  If `pause-after-unit-refresh` is set to `none`, this action will have no effect unless it is called with `check-health-of-refreshed-units` as `false`.

  Params

  + check-health-of-refreshed-units
    boolean

    Potential of data loss and downtime

    If `false`, force refresh (of next unit) if 1 or more refreshed units are unhealthy

    Warning: if first unit to refresh is unhealthy, consider running `force-refresh-start` action on that unit instead of using this parameter.
    If first unit to refresh is unhealthy because compatibility checks, pre-refresh checks, or workload container checks are failing, this parameter is more destructive than the `force-refresh-start` action.
