Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/etc/services.available/10-db-backup/run NOW not respect TIMEZONE #336

Open
terryzwt opened this issue Apr 1, 2024 · 0 comments
Open

/etc/services.available/10-db-backup/run NOW not respect TIMEZONE #336

terryzwt opened this issue Apr 1, 2024 · 0 comments

Comments

@terryzwt
Copy link

terryzwt commented Apr 1, 2024

I'm using the image on k8s, the backup scheduling using k8s cronjob; Also I set the TIMEZONE to Asia/Shanghai, but the backup file always using Etc/GMT.

Is this a bug or any suggestions to fixed this? Thanks!

apiVersion: batch/v1
kind: CronJob
metadata:
  name: bk-mysql-192-168-168-100
  namespace: default
spec:
  concurrencyPolicy: Allow
  failedJobsHistoryLimit: 1
  jobTemplate:
    metadata:
      creationTimestamp: null
      name: bk-mysql-192-168-1-1
      namespace: default
    spec:
      template:
        metadata:
          creationTimestamp: null
          name: bk-mysql-192-1-168-1
          namespace: default
        spec:
          containers:
          - command:
            - /bin/bash
            - /etc/services.available/10-db-backup/run
            - NOW
            env:
            - name: TIMEZONE
              value: Asia/Shanghai
            - name: DB_TYPE
              value: mysql
            - name: DB_HOST
              value: 192.168.1.1
            - name: DB_PORT
              value: "3306"
            - name: DB_USER
              value: root
            - name: DB_PASS
              value: password
            - name: DB_NAME
              value: ALL
            - name: DB_NAME_EXCLUDE
              value: sys,mysql
            - name: SPLIT_DB
              value: "TRUE"
            - name: DB_DUMP_TARGET
              value: /backup
            - name: CREATE_LATEST_SYMLINK
              value: "FALSE"
            image: docker.io/tiredofit/db-backup:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant