mirror of
https://github.com/Grace-Solutions/PSProxmox.git
synced 2026-08-10 07:06:54 +00:00
Add comprehensive documentation and examples
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
# Cluster-CreateBackup.ps1
|
||||
# This script demonstrates how to create a cluster backup using the PSProxmox module.
|
||||
|
||||
# Import the PSProxmox module
|
||||
Import-Module PSProxmox
|
||||
|
||||
# Connect to the Proxmox VE server
|
||||
$credential = Get-Credential -Message "Enter your Proxmox VE credentials"
|
||||
$connection = Connect-ProxmoxServer -Server "proxmox.example.com" -Credential $credential -Realm "pam"
|
||||
|
||||
# Method 1: Create a cluster backup with default settings
|
||||
$backup = New-ProxmoxClusterBackup -Connection $connection
|
||||
|
||||
# Display the backup information
|
||||
$backup
|
||||
|
||||
# Method 2: Create a cluster backup with compression
|
||||
$backup = New-ProxmoxClusterBackup -Connection $connection -Compress
|
||||
|
||||
# Display the backup information
|
||||
$backup
|
||||
|
||||
# Method 3: Create a cluster backup and wait for it to complete
|
||||
$backup = New-ProxmoxClusterBackup -Connection $connection -Compress -Wait -Timeout 600
|
||||
|
||||
# Display the backup information
|
||||
$backup
|
||||
|
||||
# Method 4: Get all cluster backups
|
||||
$backups = Get-ProxmoxClusterBackup -Connection $connection
|
||||
|
||||
# Display the backups
|
||||
$backups
|
||||
|
||||
# Method 5: Get a specific cluster backup
|
||||
$backupID = $backup.BackupID
|
||||
$specificBackup = Get-ProxmoxClusterBackup -Connection $connection -BackupID $backupID
|
||||
|
||||
# Display the specific backup
|
||||
$specificBackup
|
||||
|
||||
# Disconnect from the server when done
|
||||
Disconnect-ProxmoxServer -Connection $connection
|
||||
Reference in New Issue
Block a user