Skip to content

Conversation

@rocket357
Copy link

Per #1838

Update logical backup environment variables for GCP and Azure. I've also added azbak (we've been using in production for 6+ months now) in the example logical-backup image to allow for logical backups within azure, and added azure_upload to dump.sh.

gcc \
libffi-dev \
nodejs \
npm \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm ins't there another CLI we can use to avoid these dependencies? What about az?

envVars = append(envVars, v1.EnvVar{Name: "LOGICAL_BACKUP_S3_RETENTION_TIME", Value: c.OpConfig.LogicalBackup.LogicalBackupS3RetentionTime})
envVars = append(envVars, v1.EnvVar{Name: "LOGICAL_BACKUP_S3_BUCKET_SCOPE_SUFFIX", Value: getBucketScopeSuffix(string(c.Postgresql.GetUID()))})
} else if c.OpConfig.LogicalBackup.LogicalBackupProvider == "google" || c.OpConfig.LogicalBackup.LogicalBackupProvider == "gcs" {
envVars = append(envVars, v1.EnvVar{Name: "LOGICAL_BACKUP_GS_BUCKET", Value: c.OpConfig.LogicalBackup.LogicalBackupGSBucket})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This option does not exists. You have to implement support.

envVars = append(envVars, v1.EnvVar{Name: "LOGICAL_BACKUP_GOOGLE_APPLICATION_CREDENTIALS", Value: c.OpConfig.LogicalBackup.LogicalBackupGoogleApplicationCredentials})
} else if c.OpConfig.LogicalBackup.LogicalBackupProvider == "azure" {
// assumes logical backups are going to the same place as wal archives.
envVars = append(envVars, v1.EnvVar{Name: "LOGICAL_BACKUP_AZ_BUCKET", Value: c.OpConfig.LogicalBackup.LogicalBackupAZBucket})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comment on LogicalBackupGSBucket

// assumes logical backups are going to the same place as wal archives.
envVars = append(envVars, v1.EnvVar{Name: "LOGICAL_BACKUP_AZ_BUCKET", Value: c.OpConfig.LogicalBackup.LogicalBackupAZBucket})
envVars = append(envVars, v1.EnvVar{Name: "LOGICAL_BACKUP_AZ_BUCKET_SCOPE_SUFFIX", Value: getBucketScopeSuffix(string(c.Postgresql.GetUID()))})
envVars = append(envVars, v1.EnvVar{Name: "LOGICAL_BACKUP_AZ_STORAGE_ACCOUNT", Value: c.OpConfig.WALAZStorageAccount})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should not reuse the storage account you use for WAL backups. There should be a LogicalBackupAZStorageAccount option.

@FxKu FxKu added this to the 1.9 milestone Apr 13, 2022
@Jan-M
Copy link
Member

Jan-M commented Aug 18, 2022

@FxKu lets see if we can merge or support this. supporting all platforms sounds like a good motivator

@FxKu
Copy link
Member

FxKu commented Jan 5, 2023

with #2052 merged, I think we can close this. Might be a little confusing now to have explicit options for Azure but for AWS and GCS one has to use the same logical_backup_s3_... ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants