Search…
Target Browser API
This page describes the TVK target browser plugin that enables users to query the location where backups are stored.

Introduction

The tvk-target-browser plugin queries content of a mounted target location (enabled via target browsing) to get details of backup, backupPlan, and metadata details of backup via HTTP/HTTPS calls to target-browser server. The plugin currently supports GET operations on target-browser's /backupplan, /backup and /metadata API.

Pre-requisites:

    1.
    krew - kubectl-plugin manager. Install from here
    2.
    kubectl - kubernetes command-line tool. Install from here
    3.
    Target CR should have browsingEnabled field set to true in status
      CLI Users can check JSON path - target.status.browsingEnabled
      TVK-UI Users should follow steps:
        1.
        Click on Resource Management from the left navigation bar.
        2.
        In Resource Management, Backup Plans tab will be selected by default.
        3.
        Click on Targets tab.
        4.
        Look for the required target name in the list and ensure that in Browsing column toggle is Enabled for that target.
    4.
    TVK's web-backend service should be up and running.
    Supported OS and Architectures:
    OS:
    5.
    Linux
    6.
    darwin
    7.
    Windows
    Arch:
    8.
    amd64
    9.
    x86

Installation, Upgrade, Removal of Plugins:

    Add TVK custom plugin index of krew:
    1
    kubectl krew index add tvk-plugins https://github.com/trilioData/tvk-plugins.git
    Copied!
    Installation:
    1
    kubectl krew install tvk-plugins/tvk-target-browser
    Copied!
    Upgrade:
    1
    kubectl krew upgrade tvk-target-browser
    Copied!
    Removal:
    1
    kubectl krew uninstall tvk-target-browser
    Copied!

Usage:

    Check usage, available commands and flags -
    1
    kubectl tvk-target-browser --help
    2
    kubectl tvk-target-browser get --help
    3
    kubectl tvk-target-browser get backup --help
    4
    kubectl tvk-target-browser get backupPlan --help
    5
    kubectl tvk-target-browser get metadata --help
    Copied!

Examples

    Get list of backups:
    1
    kubectl tvk-target-browser get backup --backup-plan-uid <uid> --target-name <name> --target-namespace <namespace>
    Copied!
      Get list of backups for backupPlan:
    1
    kubectl tvk-target-browser get backup --backup-plan-uid <uid> --target-name <name> --target-namespace <namespace>
    Copied!
    Get specific backup:
    1
    kubectl tvk-target-browser get backup <backup-uid> --target-name <name> --target-namespace <namespace>
    Copied!
    List of backups in Single Namespace:
    1
    kubectl tvk-target-browser get backup --operation-scope SingleNamespace --target-name <name> --target-namespace <namespace>
    Copied!
    List of backups in Multi Namespace/Cluster Scope:
    1
    kubectl tvk-target-browser get backup --operation-scope MultiNamespace --target-name <name> --target-namespace <namespace>
    Copied!
    Get list of backupPlans:
    1
    kubectl tvk-target-browser get backupPlan --target-name <name> --target-namespace <namespace>
    Copied!
    Get specific backupPlan:
    1
    kubectl tvk-target-browser get backupPlan <backup-plan-uid> --target-name <name> --target-namespace <namespace>
    Copied!
    List of backupPlans in Single Namespace:
    1
    kubectl tvk-target-browser get backupPlan --operation-scope SingleNamespace --target-name <name> --target-namespace <namespace>
    Copied!
    List of backupPlans in Multi Namespace/Cluster Scope:
    1
    kubectl tvk-target-browser get backupPlan --operation-scope MultiNamespace --target-name <name> --target-namespace <namespace>
    Copied!
    Get metadata of specific backup:
    1
    kubectl tvk-target-browser get metadata --backup-uid <uid> --backup-plan-uid <uid> --target-name <name> --target-namespace <namespace>
    Copied!
    Get resource metadata of specific backup
    1
    kubectl tvk-target-browser get resource-metadata --backup-uid <uid> --backup-plan-uid <uid> --target-name <name> --target-namespace <namespace> --group <group> --version <version> --kind <kind> --name <resource-name>
    Copied!
    Get trilio resources for specific backup
    1
    kubectl tvk-target-browser get backup trilio-resources <backup-uid> --backup-plan-uid <uid> --kinds ClusterBackupPlan,Backup,Hook --target-name <name> --target-namespace <namespace>
    Copied!
    List of backups: filter by [expirationStartTime] and [expirationEndTime]
    1
    kubectl tvk-target-browser get backup --expiration-start-time <expiration-start-time> --expiration-end-time <expiration-end-time> --target-name <name> --target-namespace <namespace>
    Copied!
    List of backups: filter by [creationStartTime] and [creationEndTime]
    1
    kubectl tvk-target-browser get backup --creation-start-time <creation-start-time> --creation-end-time <creation-end-time> --target-name <name> --target-namespace <namespace>
    Copied!
    List of backupPlans: filter by [creationStartTime] and [creationEndTime]
    1
    kubectl tvk-target-browser get backupPlan --creation-start-time <creation-start-time> --creation-end-time <creation-end-time>--target-name <name> --target-namespace <namespace>
    Copied!
Find more examples and usage of each command & flag with --help for each tvk-target-browser command. Refer, Usage section.
Last modified 30d ago