backube / volsync

Asynchronous data replication for Kubernetes volumes
https://volsync.readthedocs.io
GNU Affero General Public License v3.0
563 stars 65 forks source link

My trigger schedule doesn't seem to be honored (v0.10.0) #1415

Open samip5 opened 1 day ago

samip5 commented 1 day ago

Describe the bug I have specified a trigger schedule to backup at 2AM, but it seems it's not honored?

Steps to reproduce Set a replicationsource with trigger schedule of 0 2 * * *

Expected behavior I expected it to honor my trigger.

Actual results It doesn't seem to honor it.

Additional context

I'm using Volume Populator, and my replication source is here:

apiVersion: volsync.backube/v1alpha1
kind: ReplicationSource
metadata:
  creationTimestamp: "2024-07-28T14:35:32Z"
  generation: 2
  labels:
    kustomize.toolkit.fluxcd.io/name: dev-forego
    kustomize.toolkit.fluxcd.io/namespace: flux-system
  name: forego-r2
  namespace: dev
  resourceVersion: "221092293"
  uid: 6107f4d4-56a4-499a-aaea-f66511200091
spec:
  restic:
    cacheCapacity: 15Gi
    cacheStorageClassName: zfs
    copyMethod: Snapshot
    moverSecurityContext:
      fsGroup: 1000
      runAsGroup: 1000
      runAsUser: 1000
    pruneIntervalDays: 7
    repository: forego-volsync-r2
    retain:
      daily: 7
      weekly: 1
    storageClassName: zfs
    volumeSnapshotClassName: zfs
  sourcePVC: forego-data
  trigger:
    schedule: 0 2 * * *

Logs that show amount of snapshots: https://gist.github.com/samip5/b7a9bdf8345a5957cb659718812ffd6c

It seems that for whatever reason, it's not following the trigger, like you can clearly see from:

3840aa4c  2024-10-10 00:03:46  volsync                 /data  500.240 MiB
1fa0a425  2024-10-10 00:10:02  volsync                 /data  500.240 MiB
629bf12a  2024-10-10 00:17:47  volsync                 /data  500.240 MiB
c5de5a39  2024-10-10 00:28:07  volsync                 /data  500.240 MiB

So why would that be?

tesshuflower commented 1 day ago

@samip5 Is the replication completing successfully? I can't tell from the container log. Do you have the full replicationsource (including the status) from your system? It should update the .status.nextSyncTime which should tell you when it thinks the next sync should be.