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

What time to specify for restorePoint #771

Closed
0xAX opened this issue Jan 22, 2025 · 3 comments
Closed

What time to specify for restorePoint #771

0xAX opened this issue Jan 22, 2025 · 3 comments

Comments

@0xAX
Copy link

0xAX commented Jan 22, 2025

Hello,

I have installed two different MySQL clusters with 1 replicas each and setup usual async replication between them. I am collecting backup only from the second instance. Now I am trying to test restore from the backup but the first instance.

My manifest is:

apiVersion: moco.cybozu.com/v1beta2
kind: MySQLCluster
metadata:
  name: mysql-primary-deployment
spec:
  replicas: 1
  mysqlConfigMapName: primary-mycnf
  restore:
    sourceName: moco-mysql-secondary-deployment-0
    sourceNamespace: testing
    restorePoint: "2025-01-22T19:15:01Z"
    jobConfig:
      serviceAccountName: moco-mysql-primary-deployment
      env:
      - name: AWS_ACCESS_KEY_ID
        value: console
      - name: AWS_SECRET_ACCESS_KEY
        value: console123
      bucketConfig:
        bucketName: mysql-backup
        region: us-east-1
        endpointURL: http://minio:9000
        usePathStyle: true
      workVolume:
        emptyDir: {}
  podTemplate:
    spec:
      containers:
      - name: mysqld
        image: ghcr.io/cybozu-go/moco/mysql:8.4.3
        resources:
          requests:
            memory: "12Gi"
            cpu: "4"
          limits:
            memory: "12Gi"
            cpu: "4"
  volumeClaimTemplates:
    - metadata:
        name: mysql-data
      spec:
        accessModes: [ "ReadWriteOnce" ]
        resources:
          requests:
            storage: 20Gi

In the minio I have -

Image

I tried both values for the restorePoint local and UTC:

  • 2025-01-22T19:15:01Z
  • 2025-01-22T19:15:01Z

although in the logs of the testing/moco-restore-mysql-primary-deployment-nsnck:restore I see:

│ {"level":"info","ts":"2025-01-22T15:05:36Z","msg":"waiting for a pod to become ready","name":"moco-mysql-primary-deployment-0"}                                            │
│ {"level":"info","ts":"2025-01-22T15:05:41Z","msg":"waiting for the mysqld to become ready","name":"moco-mysql-primary-deployment-0"}                                       │
│ Error: no available backup                                                                                                                                                 │
│ no available backup                                                                                                                                                        │
│ Stream closed EOF for testing/moco-restore-mysql-primary-deployment-nsnck (restore)      

What time it expects? Is it expected to work that backup is taken from one instance and we try to restore db on the another one?

@ymmt2005
Copy link
Member

In your screenshot, I see:

  • The created date is shown with GMT+5.
  • And the last modified time for dump.tar is "Today, 19:12".

Question. Is this "19:12" in UTC or GMT+5?

@ymmt2005
Copy link
Member

ymmt2005 commented Jan 23, 2025

Ah, it is in GMT+5 because the folder name is formatted as "20250122-141201" in UTC.

Please try again with "2025-01-22T14:12:01Z".

@ymmt2005
Copy link
Member

ymmt2005 commented Feb 6, 2025

Closing since we've got no response.

@ymmt2005 ymmt2005 closed this as completed Feb 6, 2025
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

No branches or pull requests

2 participants