Skip to main content
Version: 2.8

Set time zone for schedule policies

All schedule policies are executed based on the local time zone of the connected application cluster. This means that the timing for scheduled operations, such as backups or snapshots, aligns with the time zone configured on the cluster where the application is running, rather than the time zone of PXB cluster. As a result, it is important to ensure that the application cluster's time zone is correctly set to avoid unexpected schedule execution times.

Set schedule time zone with PXE

If you have deployed PXB with PXE, you need to modify the StorageCluster by adding an environment variable to the Stork component inside the StorageCluster spec with the following command:

kubectl patch storagecluster <stc-name> -n <stc-ns> --type='json' -p='[
{
"op": "add",
"path": "/spec/stork/env",
"value": [
{
"name": "TZ",
"value": "<country-name>/<city-name>"
}
]
}
]'

This command patches a StorageCluster object in Kubernetes using a JSON patch. Where:

  • kubectl patch: The Kubernetes CLI command used to modify a live resource without replacing the whole YAML

  • storagecluster <stc-name>: targets a StorageCluster resource with the name you specify

  • -n <stc-ns>: the namespace where the StorageCluster resides

  • --type='json': specifies that this is a JSON Patch (as defined by RFC 6902)

  • -p='[...]': the actual patch operations go here in JSON format

  • op:add → adds a new field or array to the object

  • path: /spec/stork/env → this is the path to the environment variables list for the stork component inside the StorageCluster spec.

  • value→ adds a single environment variable

  • name: TZ → timezone

  • value: "<country-name>/<city-name>" → sets the timezone to the specified region
    For example: America/Los_Angeles, after applying this command, the stork container will have an environment variable TZ=America/Los_Angeles, which controls the timezone the container runs in.

Set schedule time zone without PXE

If you have deployed only PXB without PXE in your environment, then to set schedule time zone you need to update the env section of Stork deployment spec on all application clusters as shown below:

containers:
env:
- name: TZ
value: <country-name>/<city-name>

For example, if you update value: Europe/London, the schedules fetch run on London's time zone.

Following topics guide you on how you can create and update them:

📄️ Create unlocked schedule policy

This topic provides step-by-step instructions for creating unlocked schedule policies in Portworx Backup. Unlocked schedule policies allow you to automate backup operations without object lock settings. The guide explains how to configure periodic, daily, weekly, or monthly schedules and customize retention settings, including how many backups to retain and how many incremental backups to perform between full backups. Unlocked schedule policies are useful for flexible backup automation and efficient data protection in Kubernetes environments.

📄️ Create locked schedule policy

This topic provides instructions for creating locked schedule policies in Portworx Backup. These policies allow you to schedule backups for object lock enabled backups, ensuring that data is securely retained and automatically deleted after the retention period expires. The guide covers how to configure the schedule type (periodic, daily, weekly, or monthly), and highlights the automatic retention settings and limitations for incremental backups in locked schedule policies. Locked schedule policies enhance data protection and compliance for Kubernetes backups by integrating retention and automation features.

📄️ Update object lock enabled schedule policy

This topic provides instructions for updating an object lock enabled schedule policy in Portworx Backup. Users can modify settings such as "Auto delete after retention period" and the specific time when the policy runs. The guide explains how to navigate to the schedule policy, make updates to hours and minutes, and configure automatic deletion of backups once the retention period expires. These updates help ensure proper scheduling and retention of backups while maintaining compliance with object lock policies.