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

Add mcdr event support #48

Closed
z0z0r4 opened this issue Nov 30, 2024 · 13 comments
Closed

Add mcdr event support #48

z0z0r4 opened this issue Nov 30, 2024 · 13 comments
Labels
enhancement New feature or request

Comments

@z0z0r4
Copy link

z0z0r4 commented Nov 30, 2024

As QuickBackupM and TimedQBM, extension plugin requires mcdr events.

@Fallen-Breath
Copy link
Contributor

What types of extension plugins need to receive what events in which scenarios? Please list the events you want PB to provide, along with the corresponding use case scenarios, rather than just a vague issue description

@z0z0r4
Copy link
Author

z0z0r4 commented Nov 30, 2024

In my case, the backup is done offsite at the same time, which may not be suitable for primebackup and requires an extension plugin

This will listen to the create backup event and trigger the export event

我需要把备份上传到云端,需要扩展插件,需要与 primebackup 通信

@z0z0r4
Copy link
Author

z0z0r4 commented Nov 30, 2024

Noticed that the export operation cannot specify the export path by itself. I will submit a new issue

#49

@Fallen-Breath Fallen-Breath added the enhancement New feature or request label Nov 30, 2024
@z0z0r4
Copy link
Author

z0z0r4 commented Nov 30, 2024

#50

@z0z0r4
Copy link
Author

z0z0r4 commented Nov 30, 2024

What types of extension plugins need to receive what events in which scenarios? Please list the events you want PB to provide, along with the corresponding use case scenarios, rather than just a vague issue description

我需要

# events
BACKUP_DONE_EVENT
DELETE_DONE_EVENT
EXPORT_DONE_EVENT
IMPORT_DONE_EVENT
TRIGGER_BACKUP_EVENT
TRIGGER_DELETE_EVENT
TRIGGER_EXPORT_EVENT
TRIGGER_IMPORT_EVENT

以及可能需要

RESTORE_DONE_EVENT
TRIGGER_RESTORE_EVENT

@Fallen-Breath
Copy link
Contributor

正如 #48 (comment) 中所描述,除了你想要的事件外,请逐个详细描述对应事件的使用场景(along with the corresponding use case scenarios),及其必要性(有没有其他的解决放哪,为何要使用 event 来进行交互),而非不带描述地直接罗列出各种你想要的事件。这里不是许愿池

@Fallen-Breath Fallen-Breath added the info needed Further information is requested label Nov 30, 2024
@z0z0r4
Copy link
Author

z0z0r4 commented Nov 30, 2024

对于一个将备份上传到云端的扩展,需要在 BACKUP_DONE_EVENT 时上传新备份、DELETE_DONE_EVENT 删除不需要的备份、需要在 IMPORT_DONE_EVENT 时上传导入的备份,需要 TRIGGER_EXPORT_EVENT 来导出备份以上传,需要 EXPORT_DONE_EVENT 回报上传完成。其他的是非必须的

当然有其他的解决方案,最蠢的是备份完了之后手动上传到 OSS,其次是各种操作捕捉 pb 进行操作的日志,再次是注入,http 既没有着落,也没有标准可循,都不利于未来该扩展和围绕该插件的生态的发展

@Fallen-Breath
Copy link
Contributor

对于这一具体需求,我不建议以备份为粒度,将数据保存至云端。以备份为粒度进行上传,将无法利用 PB 的文件粒度去重逻辑,导致额外占用很多空间。请仔细思考确认这是否是一个合理的需求实现。我个人的建议是,直接把 PB 的 pb_files 路径定时全量同步至云端即可

对于具体对 PB 增加 event 的 feature request 里,那些主动触发 PB 的 task 的需求,这并不适合使用 MCDR 的 event 来进行,更应该直接使用 PB 提供的 API 接口来触发。相关 API 接口也已在 TODO list 里了

@Fallen-Breath Fallen-Breath removed the info needed Further information is requested label Nov 30, 2024
@Fallen-Breath
Copy link
Contributor

http 既没有着落,也没有标准可循

这里的 http 是什么意思?该 issue 的上下文中并未出现任何与之相关的信息

如果你对这里的 http 有思考想法,也可以详细解释一下;如果你只是在自言自语,可以忽略此回复

@z0z0r4
Copy link
Author

z0z0r4 commented Nov 30, 2024

http 既没有着落,也没有标准可循

这里的 http 是什么意思?该 issue 的上下文中并未出现任何与之相关的信息

如果你对这里的 http 有思考想法,也可以详细解释一下;如果你只是在自言自语,可以忽略此回复

Screenshot_20241201_074134.jpg

似乎你打算用 http 来做扩展支持

@z0z0r4
Copy link
Author

z0z0r4 commented Nov 30, 2024

对于这一具体需求,我不建议以备份为粒度,将数据保存至云端。以备份为粒度进行上传,将无法利用 PB 的文件粒度去重逻辑,导致额外占用很多空间。请仔细思考确认这是否是一个合理的需求实现。我个人的建议是,直接把 PB 的 pb_files 路径定时全量同步至云端即可

对于具体对 PB 增加 event 的 feature request 里,那些主动触发 PB 的 task 的需求,这并不适合使用 MCDR 的 event 来进行,更应该直接使用 PB 提供的 API 接口来触发。相关 API 接口也已在 TODO list 里了

如果是上传文件池,自然不需要额外插件…但我的预期是能直接把备份拿出来用,上传大量小文件也不方便,特别是网盘

相关 api 接口指的是 todo 里面的 http 支持?

@z0z0r4
Copy link
Author

z0z0r4 commented Nov 30, 2024

对于具体对 PB 增加 event 的 feature request 里,那些主动触发 PB 的 task 的需求,这并不适合使用 MCDR 的 event 来进行,更应该直接使用 PB 提供的 API 接口来触发。相关 API 接口也已在 TODO list 里了

主动触发不论,但被动触发的需求没 event 不行吧

@z0z0r4
Copy link
Author

z0z0r4 commented Dec 1, 2024

我不做了…草,感觉都成写议论文了…我没本事,close 了

@z0z0r4 z0z0r4 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants