Backup and clone
Last updated on
Prerequisites
Section titled “Prerequisites”- You have created a PostgreSQL Flex instance.
Check Create and manage instances for PostgreSQL Flex.
Introduction
Section titled “Introduction”Backup and restore is an essential feature to guarantee the SLAs of your service. STACKIT PostgreSQL Flex offers backup and restore capabilities to help you achieve this goal. These are the features of the backup and restore capabilities:
- Automatic backup of your instances
- Point-in-time restore for all backups (WAL (Write-Ahead Log) is activated by default)
- Cloning to another instance in the same project
- All settings are accessible via the Portal, the CLI, Cloud Foundry and Terraform.
Backup
Section titled “Backup”You can configure the backup settings to the needs of your business. STACKIT PostgreSQL Flex offers backups on a daily basis. These backups also include transaction logs. The latter gives you the chance to restore to an arbitrary point in time.
There is no fee for the backup service itself; charges apply only to the storage volume occupied by the backup files. The storage size depends on your backup settings and on the accumulated instance databases size. At the moment, you need to estimate the storage need by yourself.
Backup settings and their description
Section titled “Backup settings and their description”| Setting | Description | Options |
|---|---|---|
| Daily Backup Schedule | Defines the time of the day when a full backup is created | Time of day (UTC ) |
View backup settings
Section titled “View backup settings”You can get an overview of the current backup settings of an instance.
| Flag | Description |
|---|---|
| instance-id | Instance ID of the instance you want to query |
stackit postgresflex instance describe <instance-id>You get an output like this:
ID │ a9b3b1dd-308e-4a00-b269-11d136e65824──────────────────────┼──────────────────────────────────────────────────NAME │ postgres-qaeq2npfyl75──────────────────────┼──────────────────────────────────────────────────STATUS │ Ready──────────────────────┼──────────────────────────────────────────────────STORAGE SIZE (GB) │ 5──────────────────────┼──────────────────────────────────────────────────VERSION │ 17──────────────────────┼──────────────────────────────────────────────────ACL │ 193.148.160.0/19,45.129.40.0/21,84.136.82.147/32──────────────────────┼──────────────────────────────────────────────────FLAVOR DESCRIPTION │ Small, Compute optimized──────────────────────┼──────────────────────────────────────────────────TYPE │ Single──────────────────────┼──────────────────────────────────────────────────REPLICAS │ 1──────────────────────┼──────────────────────────────────────────────────CPU │ 2──────────────────────┼──────────────────────────────────────────────────RAM (GB) │ 4──────────────────────┼──────────────────────────────────────────────────BACKUP SCHEDULE (UTC) │ 45 16 * * *The backup schedule (UTC) value holds the information. Its format is minute hour * * *. 45 16 * * * means every day at 16:45 UTC. Currently we allow only daily backups. So you can choose when the backup window starts
You can view the backup settings by navigating to the Backups tab at the service dashboard of your instance and clicking the Schedule button on the top right.
- Open your project in the STACKIT Portal.
- Navigate to Databases > PostgreSQL Flex.
- Select your PostgreSQL Flex instance and go to Overview.
- In the Daily backup schedule (UTC) field, you can see the configured daily backup schedule.
- To leave the pane, click on Cancel.
Modify backup settings
Section titled “Modify backup settings”You can modify your backup schedule to adapt the backup to your needs.
| Flag | Description |
|---|---|
| instance-id | Instance ID of the instance you want to query |
| schedule | See Backup settings and their description |
The format for the schedule is 'minute hour * * *'. The values are interpreted in UTC. For example, for creating a backup every day at 9pm UTC, compose '0 21 * * *' as your schedule.
stackit postgresflex backup update-schedule --instance-id <instance-id> --schedule <schedule>You can configure the backup settings by navigate to the Backups tab at the service dashboard of your instance and click the schedule button on the top right side.
- Open your project in the STACKIT Portal.
- Navigate to Databases > PostgreSQL Flex.
- Select your PostgreSQL Flex instance and go to Overview.
- Next to General information, click on Edit.
- On the Daily backup schedule (UTC), enter a new time of day in the same time format.
- Set everything to your needs. See Backup settings and their description for the meaning of every setting.
- To confirm, click on Save.
List existing backups
Section titled “List existing backups”You can use one of the following ways to get an overview of the existing backups.
| Flag | Description |
|---|---|
| instance-id | Instance ID of the instance you want to query |
stackit postgresflex backup list --instance-id <instance-id>The output should be like the following:
ID │ CREATED AT │ EXPIRES AT │ BACKUP SIZE─────────────────────────┼───────────────────────────┼────────────┼─────────────000000010000000000000002 │ 2025-08-28T14:56:37+00:00 │ 2025-09-27 │ 5.66MB000000010000000000000007 │ 2025-08-28T16:45:01+00:00 │ 2025-09-27 │ 7.17MB000000020000000000000015 │ 2025-08-28T22:27:24+00:00 │ 2025-09-27 │ 7.24MB000000030000000000000018 │ 2025-08-28T22:30:38+00:00 │ 2025-09-27 │ 7.17MB00000003000000000000003E │ 2025-08-29T16:45:01+00:00 │ 2025-09-28 │ 7.22MB00000003000000000000006F │ 2025-08-30T16:45:01+00:00 │ 2025-09-29 │ 7.22MB0000000300000000000000A0 │ 2025-08-31T16:45:01+00:00 │ 2025-09-30 │ 7.22MB0000000300000000000000D1 │ 2025-09-01T16:45:02+00:00 │ 2025-10-01 │ 7.22MB000000030000000100000002 │ 2025-09-02T16:45:02+00:00 │ 2025-10-02 │ 7.22MB000000030000000100000033 │ 2025-09-03T16:45:01+00:00 │ 2025-10-03 │ 7.22MB000000030000000100000064 │ 2025-09-04T16:45:01+00:00 │ 2025-10-04 │ 7.22MB000000030000000100000095 │ 2025-09-05T16:45:01+00:00 │ 2025-10-05 │ 7.22MBThe timestamps are in UTC.
You can get a list of existing backups by navigating to the Backups tab at the service dashboard of your instance.
-
Open your project in the STACKIT Portal.
-
Navigate to Databases > PostgreSQL Flex.
-
Select your PostgreSQL Flex instance and go to Backups.
-
Now you can see every available backup.
The timestamps are in UTC.
Clone feature gives you the opportunity to restore a specific backup to a new instance in the same STACKIT project. You can choose any point-in-time of your available backups. Currently, STACKIT offers no in-place-restore. So if needed, you will have to redirect your clients to point to the cloned instance.
| Flag | Description | Optional |
|---|---|---|
| instance-id | Instance ID of the instance you want to query | |
| recovery-timestamp | Timestamp as of RFC3339 for point-in-time recovery | |
| storage-class | Desired storage class for the cloned instance. See Flavors and performance classes of PostgreSQL Flex for available performance classes. | x |
| storage-size | The storage size for the cloned instance in GB | x |
stackit postgresflex instance clone <instance-id> --recovery-timestamp <timestamp> --storage-class <storage-class> --storage-size 10Examples
Section titled “Examples”stackit postgresflex instance clone xxx --recovery-timestamp 2023-04-17T09:28:00+00:00stackit postgresflex instance clone xxx --recovery-timestamp 2023-04-17T09:28:00+00:00 --storage-class premium-perf6-stackitYou can clone a backup by navigating to the Backups tab at the service dashboard of your instance and clicking the Options button on the right side of the selected backup.
- Open your project in the STACKIT Portal.
- Navigate to Databases > PostgreSQL Flex.
- Select your PostgreSQL Flex instance and go to Backups.
- Click on the three-dots menu of the right side of your desired backup you plan to clone.
- Choose date and time (point-in-time clone) as well as the desired storage class and storage size of the cloned instance.
- After accepting the terms, click on Order fee-based.
- Wait for the cloned instance to become ready.