npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@niveus/apigee-backup-tool

v2.0.5

Published

#### Supports both Apigee x and Apigee hybrid , does not support Apigee Edge

Downloads

68

Readme

APIGEE - Backup Tool

Supports both Apigee x and Apigee hybrid , does not support Apigee Edge

The tool can backup Apigee Api Proxies, Shared flows, Api Products etc

NOTE: The Script is tested and works fine on Linux(ubuntu) and nodejs version >16

Prerequisite

  1. Download gcloud

  2. Install nodejs

  3. Clone the repository

  4. Create a directory where you want to backup all apigee objects

Getting Started

This tool is published to npm registry. Can be installed as a global npm package and used as a cli tool - https://www.npmjs.com/package/@niveus/apigee-backup-tool

  1. run npm install -g @niveus/apigee-backup-tool to install the script as a global npm package

  2. Now you can run the script as a cli tool from anywhere from your ubuntu machine

  3. run apigee-backup-tool login to authenticate with google cloud

  4. run apigee-backup-tool config set --orgName name-of-organization --backupFolderPath /path/to/backup/folder/ to configure the apigee organization name and backup folder path

  5. run apigee-backup-tool --help to get help on all the available commands

Usage: apigee-backup-tool [options] [command]

CLI tool to backup  apigee resources like api proxies, shared flows, Api
products etc

Options:
  -V, --version              output the version number
  -h, --help                 display help for command

Commands:
  config [options] <action>  configure organization name and backupFolderPath
  backup [options] <type>    Backup a specific apigee resource
  login                      Login to google cloud - Runs 'gcloud
                             application-default login' command
  all
      Back up following Apigee resources
          1. Api Proxy
          2. Shared Flow
          3. Api Products
          4. Developers
          5. Developer Apps
          6. Custom Reports
          7. Flow Hooks
          8. Target Servers

  api-proxy [options]        Backup all revisions of all Api Proxies
  shared-flow [options]      Backup all revisions of all Shared Flows
  api-product [options]      Backup all Api Products
  developer [options]        Backup all App Developers
  developer-app [options]    Backup all developer Apps
  flow-hook [options]        Backup all Flow Hooks
  custom-report [options]    Backup all Custom Reports
  target-server [options]    Backup all Target Server
  help [command]             display help for command


  1. run following commands as required

    • run apigee-backup-tool all or apigee-backup-tool backup all to backup all apigee resources

    • run below commands to backup Api Proxies

        // To backup all revisions of all api proxies
        apigee-backup-tool api-proxy --all
        or
        apigee-backup-tool backup api-proxy --all
      
        // To backup specific revision of a specific api proxy
      
        apigee-backup-tool api-proxy --name name-of-proxy --revision proxy-revision
        or
        apigee-backup-tool backup api-proxy --name name-of-proxy --revision proxy-revision
      
      
    • run below commands to backup shared flows

        // To backup all revisions of all shared flows
        apigee-backup-tool shared-flow --all
        or
        apigee-backup-tool backup shared-flow --all
      
        // To backup specific revision of a specific shared flow
      
        apigee-backup-tool shared-flow --name name-of-shared-flow --revision shared-flow-revision
        or
        apigee-backup-tool backup shared-flow --name name-of-shared-flow --revision shared-flow-revision
      
      
    • run below commands to backup Api Products

        // To backup all Api Products
        apigee-backup-tool api-product --all
        or
        apigee-backup-tool backup api-product --all
      
        // To backup a specific api product
      
        apigee-backup-tool api-product --name name-of-api-product
        or
        apigee-backup-tool backup api-product --name name-of-api-product
    • run below commands to backup Developers

        // To backup all Developers
        apigee-backup-tool developer --all
        or
        apigee-backup-tool backup developer --all
      
        // To backup a specific Developer
      
        apigee-backup-tool developer --name developer-email
        or
        apigee-backup-tool backup developer --name developer-email
    • run below commands to backup Developer Apps

        // To backup all Developer Apps
        apigee-backup-tool developer-app --all
        or
        apigee-backup-tool backup developer-app --all
      
        // To backup a specific Developer app
      
        apigee-backup-tool developer-app --dev developer-email --name app-name
        or
        apigee-backup-tool backup developer-app --dev developer-email --name app-name
    • run below commands to backup Custom reports

        // To backup all Custom reports
        apigee-backup-tool custom-report --all
        or
        apigee-backup-tool backup custom-report --all
      
        // To backup a specific custom report
      
        apigee-backup-tool custom-report  --name custom-report-name
        or
        apigee-backup-tool backup custom-report  --name custom-report-name
      
        custom-report-name - is actually an id Ex: 3aed7d5c-330d-4e30-acf1-d19a25be64ba
    • run below commands to backup flow hooks

        // To backup all flow hooks for all environments
        apigee-backup-tool flow-hook --all
        or
        apigee-backup-tool backup flow-hook --all
      
        //To backup all flow hooks for specific environment
        apigee-backup-tool flow-hook --envName name-of-environment
        or
        apigee-backup-tool backup flow-hook --envName name-of-environment
    • run below commands to backup Target servers

      
      // To backup all Target servers for all environment
          apigee-backup-tool target-server --all
          or
          apigee-backup-tool backup target-server --all
      
      //To backup all Target servers for specific environment
        apigee-backup-tool target-server --envName name-of-environment
        or
        apigee-backup-tool backup target-server --envName name-of-environment
      
      
  2. Run step 4 and step 5 everytime you want to switch between gcp accounts and apigee organization