For my own convenience, I created a PowerShell module to upload backup files to Amazon's new backup service "Glacier".
The module is contained in this file:
http://dl.dropbox.com/u/2350654/blog/FxAWS.zip
(including the Amazon AWS SDK library)
Extract it into your Powershell module directory, e.g.
C:\Users\<your name>\Documents\WindowsPowerShell\Modules.
(this will create a directory FxAWS under the directory Modules)
Start powershell and run:
Import-Module FxAWS
C:\Users\wim devos.GENOFFICE> Write-AWSGlacier -AWSAccessKey '<access key>' -AWSSecretKey '<secret key>' -AWSRegion <some region> -
GlacierVault <vault name> -Filename <filename> -Description <description>
e.g.
Write-AWSGlacier -AWSAccessKey '[your access key]' -AWSSecretKey ' [your secret key] ' -AWSRegion us-east-1 -GlacierVault "backup" -Filename "backup-20120830.7z"
The parameters are:
- AWSAccessKey and AWSSecretKey.
These are NOT your login and password to log on to the Amazon.com web site.
You can find the access key and secret key in your Amazon.com account:
https://portal.aws.amazon.com/gp/aws/securityCredentials
Extra credentials can be created and they can be removed individually. - AWSRegion.
The region where your Glacier Vault has been created. - GlacierVault
The name of the Vault that you created in the Glacier administration website. - FileName
The file that you want to upload. - Description (optional)
A description used in the Glacier administration website. When none is specified, the last part of the filename path is used.
You can create 3 (global) PowerShell variabled $AWSAccessKey_Default, $AWSSecretKey_Default and $AWSRegion_Default, in which case you can omit the -AWS* parameters.
Nenhum comentário:
Postar um comentário