Backup and clone
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’s PostgreSQL Flex offers backup and restore capabilities to help you achieve this goal. These are the features of the backup and restore capabilities:
- Backup and clone of your instances
- Point-in-time restore for all backups (WAL (Write-Ahead Log) is activated by default)
- Snapshot retention to up for one month
- 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’s 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.
You don’t pay for the backup itself, but for the storage the generated backup files reserve. 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 |
|---|---|---|
| Backup Schedule | Defines how often on every day a 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 postgresqlflex 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 day month year. 45 16 * * * means every day at 16:45 UTC.
BACKUP SCHEDULE (UTC) is the representation for the Backup Schedule setting. It follows the cron format. The important number is behind the slash and reflects whether a backup is run either every 6, 8, 12 or 24 hours. DAILY SNAPSHOT RETENTION (DAYS), WEEKLY SNAPSHOT RETENTION (WEEKS) and MONTHLY SNAPSHOT RETENTION (MONTHS) corresond to Daily Snapshot Retention, Weekly Snapshot Retention and Monthly Snapshot Retention. SNAPSHOT RETENTION (DAYS) represents Snapshot Retention (simple snapshots). The POINT IN TIME WINDOW (HOURS) shows the amount of time for which you can restore to a specific point in time. From a technical standpoint, it represents the length of the transaction log.
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 as UTC. For example, for creating a backup every day at 9pm UTC, compose '0 21 * * *' as your schedule.
stackit postgresqlflex 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 military 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 have an overview of the existing backups.
| Flag | Description |
|---|---|
| instance-id | Instance ID of the instance you want to query |
stackit postgresqlflex backup list --instance-id <instance-id>You get something like this:
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.
You can clone a specific backup to a new instance in the same STACKIT project. You can choose any point-in-time of your available backups. Unfortunately, STACKIT offers no in-place-restore. So you either need to clone to a new instance and manually transfer your databases and tables to your existing instance, or you need 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 postgresqlflex instance --instance-id <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.