< Back

Download-PBackup

Sat Jan 18, 2020 7:26 pm

NAME Download-PBackup



SYNOPSIS

Once a backup is ready for download, you can download it (as a ZIP file named backup_YEAR_MO_DY.zip) using this

task.





SYNTAX

Download-PBackup [-PopuliUri] <String> [-PopuliAuthkey] <String> [-BackupId] <Int32> [-Path] <String>

[<CommonParameters>]





DESCRIPTION

Unlike most tasks in Populi's API, this function returns the actual binary data of a ZIP file rather than XML.

By specifying on_complete_url when calling requestBackup, you can have your own web application called as soon as

the backup is ready for download.

Your application can then call downloadBackup to get the ZIP file and encrypt and save it however you'd like.





PARAMETERS

-PopuliUri <String>

Set to the correct URL for your college (i.e. https://<YOUR_SUBDOMAIN_HERE>.populiweb.com/api/).

This parameter is required.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-PopuliAuthkey <String>

The authentication key with necessary permissions for the data you are requesting.

This parameter is required.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-BackupId <Int32>

The numeric ID of the backup you'd like to download. This value is returned by running the Request-PBackup

cmdlet.

This parameter is required.



Required? true

Position? 3

Default value 0

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Path <String>

Enter the path to store the backup file. The path will be tested before the backup begins to download. Do not

include the filename.

This will be returned with the downloaded file. Remember to save in a secure location.

This parameter is required.



Required? true

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

Binary zip file data. The HTTP Content-disposition header will include the filename (e.g. backup_YYYY_MO_DY.zip).





NOTES





Author: Matthew Rehm

Creation Date: 02/07/2019



-------------------------- EXAMPLE 1 --------------------------



Download-PBackup -PopuliUri 'https://<YOUR_SUBDOMAIN_HERE>.populiweb.com/api/ -PopuliAuthkey '1234567890'

-BackupId 39614 -Path "c:\\users\\$ENV:USERNAME\\Desktop"













-------------------------- EXAMPLE 2 --------------------------



PS C:\\>#Store your Populi Credentials in a hash table:



$PopuliCredentials = @{

PopuliURI = https://<YOUR_SUBDOMAIN_HERE>.populiweb.com/api/

PopuliAuthkey = '1ReallyLongAlphaNumericSequence'

}

Download-PBackup @PopuliCredentials -BackupId 39614 -Path $Path











RELATED LINKS