GithubHelp home page GithubHelp logo

rebelinux / veeam.diagrammer Goto Github PK

View Code? Open in Web Editor NEW
24.0 4.0 2.0 15.76 MB

Veeam Diagrammer: A #powershell module to automatically generate Veeam Backup & Replication resource topology diagrams by just typing a PowerShell cmdlet and passing the name of the Veeam Backup Server

License: MIT License

PowerShell 100.00%
graphviz dot-language powershell topology-diagram veeam

veeam.diagrammer's Introduction

Buy Me a Coffee at ko-fi.com

Veeam VBR Diagrammer

❗ THIS POWERSHELL MODULE IS CURRENTLY IN DEVELOPMENT AND MIGHT NOT YET BE FUNCTIONAL ❗

Veeam Diagrammer is a PowerShell module to automatically generate Veeam Backup & Replication topology diagrams by just typing a PowerShell cmdlet and passing the name of the Backup Server.

This project is extensively based on the AzViz module.

Special thanks & shoutout to Kevin Marquette and his PSGraph module and to Prateek Singh and his AzViz project without it work the Veeam.Diagrammer won't be possible!

📚 Sample Diagram

Scale-Out Backup Repository Diagram

Scale-Out Backup Repository Diagram

Backup Repository Diagram

Backup Repository Diagram

Backup Proxy Diagram

Backup Proxy Diagram

🔰 Getting Started

Below are the instructions on how to install, configure and generate a Veeam.Diagrammer diagram.

💾 Supported Versions

The Veeam.Diagrammer supports the following Veeam Backup & Replication version;

  • Veeam Backup & Replication V11 (Standard, Enterprise & Enterprise Plus Edition)
  • Veeam Backup & Replication v12+ (Standard, Enterprise & Enterprise Plus Edition)

🔐 Required Privileges

Only users with Veeam Backup Administrator role assigned can generate a Diagram

PowerShell

This project is compatible with the following PowerShell versions;

Windows PowerShell 5.1 PowerShell 7

🔧 System Requirements

PowerShell 5.1, and the following PowerShell modules are required for generating a Veeam.Diagrammer diagram.

What is GraphViz?

Graphviz is open source graph visualization software. Graph visualization is a way of representing structural information as diagrams of abstract graphs and networks. It has important applications in networking, bioinformatics,  software engineering, database and web design, machine learning, and in visual interfaces for other technical domains. 

No need to install GraphViz on your system because from now on it's libraries are included in the local module path.

📦 Module Installation

PowerShell

# Install Veeam.Diagrammer from the Powershell Gallery
install-module -Name Veeam.Diagrammer

GitHub

If you are unable to use the PowerShell Gallery, you can still install the module manually. Ensure you repeat the following steps for the system requirements also.

  1. Download the code package / latest release zip from GitHub

  2. Extract the zip file

  3. Copy the folder Veeam.Diagrammer to a path that is set in $env:PSModulePath.

  4. Open a PowerShell terminal window and unblock the downloaded files with

    $path = (Get-Module -Name Veeam.Diagrammer -ListAvailable).ModuleBase; Unblock-File -Path $path\*.psd1; Unblock-File -Path $path\Src\Public\*.ps1; Unblock-File -Path $path\Src\Private\*.ps1
  5. Close and reopen the PowerShell terminal window.

Note: You are not limited to installing the module to those example paths, you can add a new entry to the environment variable PSModulePath if you want to use another path.

✏️ Commands

New-VeeamDiagram

The New-VeeamDiagram cmdlet is used to generate a Veeam Backup & Replication diagram. The type of diagram to generate is specified by using the DiagramType parameter. The DiagramType parameter relies on additional diagram modules being created alongside the defaults module. The Target parameter specifies one or more Veeam VBR servers on which to connect and run the diagram. User credentials to the system are specified using the Credential, or the Username and Password parameters. One or more document formats, such as PNG, PDF, SVG, BASE64 or DOT can be specified using the Format parameter. Additional parameters are outlined below.

.PARAMETER DiagramType
  Specifies the type of veeam vbr diagram that will be generated.
  The supported output diagrams are:
            'Backup-to-Sobr', 'Backup-to-vSphere-Proxy', 'Backup-to-HyperV-Proxy',
            'Backup-to-Repository', 'Backup-to-WanAccelerator', 'Backup-to-Tape',
            'Backup-to-File-Proxy', 'Backup-to-ProtectedGroup', 'Backup-to-All'
.PARAMETER Target
  Specifies the IP/FQDN of the system to connect.
  Multiple targets may be specified, separated by a comma.
.PARAMETER Port
  Specifies a optional port to connect to Veeam VBR Service.
  By default, port will be set to 9392
.PARAMETER Credential
  Specifies the stored credential of the target system.
.PARAMETER Username
  Specifies the username for the target system.
.PARAMETER Password
  Specifies the password for the target system.
.PARAMETER Format
  Specifies the output format of the diagram.
  The supported output formats are PDF, PNG, DOT & SVG.
  Multiple output formats may be specified, separated by a comma.
.PARAMETER Direction
  Set the direction in which resource are plotted on the visualization
  The supported directions are:
      'top-to-bottom', 'left-to-right'
  By default, direction will be set to top-to-bottom.
.PARAMETER NodeSeparation
  Controls Node separation ratio in visualization
  By default, NodeSeparation will be set to .60.
.PARAMETER SectionSeparation
  Controls Section (Subgraph) separation ratio in visualization
  By default, NodeSeparation will be set to .75.
.PARAMETER EdgeType
  Controls how edges lines appear in visualization
  The supported edge type are:
      'polyline', 'curved', 'ortho', 'line', 'spline'
  By default, EdgeType will be set to spline.
  References: https://graphviz.org/docs/attrs/splines/
.PARAMETER OutputFolderPath
  Specifies the folder path to save the diagram.
.PARAMETER Filename
  Specifies a filename for the diagram.
.PARAMETER EnableEdgeDebug
  Control to enable edge debugging ( Dummy Edge and Node lines ).
.PARAMETER EnableSubGraphDebug
  Control to enable subgraph debugging ( Subgraph Lines ).
.PARAMETER EnableErrorDebug
  Control to enable error debugging.
.PARAMETER AuthorName
  Allow to set footer signature Author Name.
.PARAMETER CompanyName
  Allow to set footer signature Company Name.
.PARAMETER Logo
  Allow to change the Veeam logo to a custom one.
  Image should be 400px x 100px or less in size.
.PARAMETER SignatureLogo
  Allow to change the Veeam.Diagrammer signature logo to a custom one.
  Image should be 120px x 130px or less in size.
.PARAMETER Signature
  Allow the creation of footer signature.
  AuthorName and CompanyName must be set to use this property.

For a full list of common parameters and examples you can view the New-VeeamDiagram cmdlet help with the following command;

Get-Help New-VeeamDiagram -Full

💻 Examples

There are a few examples listed below on running the Veeam.Diagrammer script against a Veeam Backup Server. Refer to the README.md file in the main Veeam.Diagrammer project repository for more examples.

# Generate a Veeam.Diagrammer diagram for Backup Server 'veeam-vbr.pharmax.local' using specified credentials. Export report to PDF & PNG formats. Use default report style. Save reports to 'C:\Users\Jon\Documents'
PS C:\> New-VeeamDiagram -DiagramType Backup-to-SOBR -Target veeam-vbr.pharmax.local -Username 'Domain\veeam_admin' -Password 'P@ssw0rd' -Format pdf,png -OutputFolderPath 'C:\Users\Jon\Documents'

# Generate a Veeam.Diagrammer diagram for Backup Server veeam-vbr.pharmax.local using stored credentials. Export report to DOT & SVG formats. Save reports to 'C:\Users\Jon\Documents'.
PS C:\> $Creds = Get-Credential
PS C:\> New-VeeamDiagram -DiagramType Backup-to-SOBR -Target veeam-vbr.pharmax.local -Credential $Creds -Format dot,pdf -OutputFolderPath 'C:\Users\Jon\Documents'

❌ Known Issues

  • Since many of Veeam's features depend on the Standard+ license, the Community edition is not supported.

veeam.diagrammer's People

Contributors

rebelinux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

veeam.diagrammer's Issues

SureBackup Diagram

Description

Add a new diagram containing information about surebackup Virtual Lab and Application Group relationship

Example:

image

image

Additional Context

No response

Before submitting

  • I have read the documentation, and referred to the known issues before submitting this change request.
  • I have checked for previously opened & closed issues before submitting this change request.

Add Agent proxy servers to graph

I noticed that the report includes code for VMware and HyperV proxies.

Is it possible to add Agent Proxies (the ones needed for File Shares backup in addition to Agent backups)?

Unable to run report

Describe the bug
Whenever I try to run the Backup-to-All report on my Veeam server, I get the following error:

Graph : Index operation failed; the array index evaluated to null.
At C:\Program Files\WindowsPowerShell\Modules\Veeam.Diagrammer\0.5.3\Src\Public\New-VeeamDiagram.ps1:271 char:18
+ ...      $Graph = Graph -Name VeeamVBR -Attributes $MainGraphAttributes {
+                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Graph], RuntimeException
    + FullyQualifiedErrorId : NullArrayIndex,Graph

Unable to run report

Running against Veeam 12.1 & PostgreSQL.
Fails when trying to run any combination of the command. Main difference is it's V12.1 & PostgreSQL.

New-VeeamDiagram -Target SERVER-NAME -Credential $Creds -DiagramType Backup-to-Repository -Format pdf,png -Direction top-to-bottom -OutputFolderPath C:\temp\temp -EdgeType polyline -Verbose -EnableEdgeDebug -EnableSubGraphDebug

Graph : Index operation failed; the array index evaluated to null.

Has worked well in past in different environments. 1st time running on 12.1 & PostgreSQL

VERBOSE: Loading module from path 'C:\Program Files\Veeam\Backup and
Replication\Console\Veeam.Backup.PowerShell..\Veeam.Backup.PowerShell.dll'.
VERBOSE: Trying to import Veeam B&R modules.
VERBOSE: Loading module from path 'C:\Program Files\Veeam\Backup and
Replication\Console\Veeam.Backup.PowerShell..\Veeam.Backup.PowerShell.dll'.
VERBOSE: Identifying Veeam Powershell module version.
VERBOSE: Using Veeam Powershell module version 11.
VERBOSE: Loading module from path 'C:\Program Files\Veeam\Backup and
Replication\Console\Veeam.Backup.PowerShell..\Veeam.Backup.PowerShell.dll'.
VERBOSE: Establishing initial connection to Backup Server: XXX .
VERBOSE: Looking for veeam existing server connection.
VERBOSE: No existing veeam server connection found
VERBOSE: Connecting to XXX with XXX credentials
VERBOSE: Validating connection to XXX
VERBOSE: Successfully connected to XXX:9392 Backup Server.
VERBOSE: Operation '' complete.
VERBOSE: Collecting Backup Server information from XXX.
Graph : Index operation failed; the array index evaluated to null.
At C:\Program Files\WindowsPowerShell\Modules\Veeam.Diagrammer\0.5.3\Src\Public\New-VeeamDiagram.ps1:271 char:18

  • ... $Graph = Graph -Name VeeamVBR -Attributes $MainGraphAttributes {
  •               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [Graph], RuntimeException
    • FullyQualifiedErrorId : NullArrayIndex,Graph

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.