Skip to content

Save-HomebridgeBackup

SYNOPSIS

Downloads a scheduled Homebridge backup.

SYNTAX

Named (Default)

Save-HomebridgeBackup -OutFile <string> [-InstanceName <string>] [-BackupId <string>] [-Force]
 [-WhatIf] [-Confirm]

ExplicitNoAuthentication

Save-HomebridgeBackup -Url <string> -NoAuthentication -OutFile <string> [-BackupId <string>]
 [-Force] [-WhatIf] [-Confirm]

ExplicitCredential

Save-HomebridgeBackup -Url <string> -Credential <pscredential> -OutFile <string>
 [-BackupId <string>] [-Force] [-WhatIf] [-Confirm]

DESCRIPTION

This function saves a current instance backup or one scheduled backup to an explicit local path. It creates a missing parent directory and returns the saved file.

It rejects a directory destination. It also rejects an existing file unless the caller sets Force. The operation supports ShouldProcess.

EXAMPLES

EXAMPLE 1

Save-HomebridgeBackup -InstanceName home -BackupId backup-1 -OutFile './backup.tar.gz'

Saves backup-1 at the requested destination and returns the saved file.

EXAMPLE 2

Save-HomebridgeBackup -InstanceName home -OutFile './homebridge-current.tar.gz'

Creates and saves a current backup of the instance.

PARAMETERS

-BackupId

The scheduled backup identifier. When omitted, the function downloads a current instance backup.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Credential

Explicit credentials.

Type: System.Management.Automation.PSCredential
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ExplicitCredential
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Force

Permits replacing an existing destination file.

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-InstanceName

The saved connection name.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Named
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-NoAuthentication

Indicates that the server does not require authentication.

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ExplicitNoAuthentication
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-OutFile

The explicit local destination.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Url

An explicit Homebridge URL.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ExplicitNoAuthentication
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: ExplicitCredential
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-WhatIf

Runs the command in a mode that only reports what would happen without performing the actions.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None.

You cannot pipe objects to this function.

OUTPUTS

System.IO.FileInfo.

This function returns the completed download file.

NOTES

https://pshomebridge.xyz/command-reference/commands/Save-HomebridgeBackup/

https://github.com/angrycuban13/PSHomebridge/blob/main/PSHomebridge/Source/Public/Save-HomebridgeBackup.ps1