如何配置 Longhorn 备份,以便在拍摄快照/备份之前和之后在 pod 中执行一些 bash 脚本?
类似于 Velero 的备用钩子的东西。
annotations:
backup.velero.io/backup-volumes: data
pre.hook.backup.velero.io/command: "['/usr/bin/mysql', '-e', '\"flush tables with read lock;\"']"
pre.hook.backup.velero.io/container: mysql
post.hook.backup.velero.io/command: "['/usr/bin/mysql', '-e', '\"unlock tables;\"']"
post.hook.backup.velero.io/container: mysql