Skip to content

[Feature Request]: Backup and restore on account level #11492

Closed

Description

@domingozhang

Is there an existing issue for the same feature request?

  • I have checked the existing issues.

Is your feature request related to a problem?

No response

Describe the feature you'd like

PRD:https://doc.weixin.qq.com/doc/w3_ALQAjwY-ACUgMtudAC9T0qFtMLtJe?scode=AJsA6gc3AA8WywQ64sAAgAkgYHABU

ref:https://doc.weixin.qq.com/doc/w3_ALQAjwY-ACUUKtPzlyTRbueaRY71R?scode=AJsA6gc3AA8IXehkgyALQAjwY-ACU

Update in 1.2, follow all features of this PRD without PITR.

Current mo_br only supports backup and restore on full cluster level.
Need a feature to backup and restore on account level.

In config list, add a new parameter
account: the target account for backup and restore

Use snapshots as backup method with a new parameter names snapshot.

Describe implementation you've considered

No response

Documentation, Adoption, Use Case, Migration Strategy

No response

Additional information

No response

Activity

  1. added
    priority/p0
    attention/being-discussed
    on Aug 28, 2023
  2. added this to the 1.1.0 milestone on Aug 28, 2023
  3. added
    source/on-demand
    on Aug 28, 2023
  4. added
    attention/doc-influence
    on Aug 29, 2023
  5. added and removed
    priority/p0
    on Aug 30, 2023
  6. domingozhang commented on Sep 6, 2023

    @domingozhang
    ContributorAuthor

    backup:

    // 开始备份
    mo_br backup

    ===============================
    Flags:

    --hostname string 目标MO的IP
    --port int 端口号
    --user string 用户名,仅限系统租户管理员
    --password string 用户名对应的密码
    --backup_dir s3|filesystem 备份的目标路径类型。指定备份的目标路径时使用。
        //s3 oss minio
            --endpoint string
            --access_key_id string
            --secret_access_key string
            --bucket string
            --filepath string
            --region string
            --compression string
            --role_arn string
            --is_minio
        //filesystem
            --path string
    --meta_path string 指定meta文件位置。只能是文件系统中的路径。如果不指定,默认是同一目录下的mo_br.meta文件。可以指定成其他目录下的文件。例如:"/home/mo/abc.meta"
    --time string 备份的时间点。默认是当前时间。格式:"YYYY-MM-DD HH:MM:SS"
    --account 备份的租户名称
    --snapshot bool 是否使用快照备份模式
    
  7. domingozhang commented on Sep 6, 2023

    @domingozhang
    ContributorAuthor

    //恢复。
    mo_br restore

    不借助mo_br.meta,必须要指定明确的备份所在目录。

    ===============================
    Flags:

    //备份所在的路径 backup_directory。在没有指定ID时,必须要指定。
    --backup_dir s3|filesystem 备份的目标路径类型。指定备份的目标路径时使用。
        //s3 
            --backup_endpoint string
            --backup_access_key_id string 
            --backup_secret_access_key string
            --backup_bucket string
            --backup_filepath string
            --backup_region string
            --backup_compression string
            --backup_role_arn string
            --backup_is_minio
        //filesystem
            --backup_path string
    
    //恢复的目标路径 restore_directory
    --restore_dir s3|filesystem 恢复的目标路径类型。指定恢复的目标路径时使用。
        //s3 
            --restore_endpoint string
            --restore_access_key_id string
            --restore_secret_access_key string
            --restore_bucket string
            --restore_filepath string
            --restore_region string
            --restore_compression string
            --restore_role_arn string
            --restore_is_minio
        //filesystem
            --restore_path string
            --dn_config_path string  
                恢复到standalone启动时,需要dn的配置文件。要在restore_directory中,建立DN的目录层级。
                如果指定,读取配置,建立目录层级。
                如果不指定,
                    尝试读取backup_dir中的config文件。建立目录层级。
                    如果没有,建立的默认目录层级:restore_directory/mo-data/s3
    
    --meta_path string 指定meta文件位置。如果不指定,默认是同一目录下的mo_br.meta文件。
    --checksum 在数据传输前后,校验数据。默认不校验。
    --account 备份的租户名称
    --snapshot bool 是否使用快照备份模式
    
  8. domingozhang commented on Sep 6, 2023

    @domingozhang
    ContributorAuthor

    // 查询备份 或 查询某个ID的备份
    // 如果没有指定ID,就查询所有备份。
    // 如果指定了ID,就查询指定ID的备份。并且默认会检查备份数据(只判断需要的文件存在,目前不包含tae数据文件)。--not_check_data 会关闭检查备份数据。
    mo_br list [ID]

    ===============================
    Flags:

    //要查询备份数据。如果备份在s3(oss minio)上时,需要指定
    --access_key_id string
    --secret_access_key string
    --not_check_data 只查看meta中的信息。不查看备份数据。
    --meta_path string 指定meta文件位置。如果不指定,默认是同一目录下的mo_br.meta文件。
    

    1.1输出增加account名称与备份方式

  9. domingozhang commented on Sep 6, 2023

    @domingozhang
    ContributorAuthor

    // 删除备份
    // 默认会删除备份数据。--not_check_data 会关闭删除备份数据。
    mo_br delete ID

    ===============================
    Flags:

    //要删除备份数据。如果备份在s3(oss minio)上时,需要指定
    --access_key_id string
    --secret_access_key string
    --not_delete_data 只删除meta中的信息。不删除备份数据。
    --meta_path string 指定meta文件位置。如果不指定,默认是同一目录下的mo_br.meta文件。
    
  10. 6 remaining items

  11. modified the milestones: 1.2.1, 1.2.2 on Jun 11, 2024
  12. daviszhen commented on Jul 4, 2024

    @daviszhen
    Contributor

    遗留:
    table id 找不到(影响正确性,罗飞在看)。
    ssb 100G oom。
    ssb 10g恢复性能不稳定

  13. modified the milestones: 1.2.2, 1.2.3 on Jul 8, 2024
  14. aressu1985 commented on Jul 18, 2024

    @aressu1985
    Contributor

    @allengaoo 请进行验收

  15. Ariznawlll commented on Jul 18, 2024

    @Ariznawlll
    Collaborator
  16. aressu1985 commented on Aug 22, 2024

    @aressu1985
    Contributor

    该issue关闭,后续以问题跟踪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

attention/dev-design-requiredattention/doc-influencekind/featurepriority/p-1source/on-demand

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions