Backup-ASDatabase

Enables a database administrator to take the backup of Analysis Service Database to a file.
Backup-ASDatabase [-BackupFile*] <string> [-Name*] <string> [-AllowOverwrite <SwitchParameter>][-BackupRemotePartitions <SwitchParameter>] [-ApplyCompression <SwitchParameter>] [-FilePassword <SecureString>][-Locations <Microsoft.AnalysisServices.BackupLocation[]>] [-Server <string>] [-Credentials <PSCredential>][<CommonParameters>]
Backup-ASDatabase -Database* <Microsoft.AnalysisServices.Database> [-AllowOverwrite <SwitchParameter>][-BackupRemotePartitions <SwitchParameter>] [-ApplyCompression <SwitchParameter>] [-FilePassword <SecureString>][-Locations <Microsoft.AnalysisServices.BackupLocation[]>] [-Server <string>] [-Credentials <PSCredential>][<CommonParameters>]

Enables a database administrator to take the backup of Analysis Service Database to a file. If only backup file name is mentioned without the location, the default backup location specified during the installation will be considered. Database Administrator can also pass multiple databases through pipeline and perform the backup operation.

Parameters
-BackupFile <string>

  • This value is required

The backup file path/name where database will be backed up. If only backup file name is mentioned without the location, the default backup location specified during the installation will be considered.

-Name <string>

  • This value is required

Analysis Services Database Name that has to be backed up.

-AllowOverwrite <SwitchParameter>

Indicates whether the destination files can be overwritten during backup.

-BackupRemotePartitions <SwitchParameter>

Indicates whether remote partitions will be backed up or not.

-ApplyCompression <SwitchParameter>

Indicates whether the backup file will be compressed or not.

-FilePassword <SecureString>

The password to be used with backup file encryption

-Server <string>

  • Default value is localhost

Specifies the Analysis Services instance to which the cmdlet will connect and execute. If not server name is specified, the cmdlet will try to connect to localhost. For default instances, only specify the computer name: “MyComputer”. For named instances, use the format “ComputerNameInstanceName” For IIS Server, use the format http[s]://server[:port]/virtualdirectory/msmdpump.dll.

-Credentials <PSCredential>

If this parameter is specified, the user name and password passed will be used to connect to specified Analysis Server instance. If no credentials are specified default windows account of the user who is running the tool will be used.

-Locations <Microsoft.AnalysisServices.BackupLocation[]>

The locations where the backup will be stored.

-Database <Microsoft.AnalysisServices.Database[]>

  • This value is required
  • Accepts pipeline input

Analysis Services Database object that has to be backed up.

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,ErrorAction, ErrorVariable, WarningAction, WarningVariable,OutBuffer, PipelineVariable, and OutVariable.

Inputs

Microsoft.AnalysisServices.Database

Examples
  1. Backup the database ‘mydatabase’ to a file ‘mydb.abf’:
    C:PS> Backup-ASDatabase mydb.abf mydatabase
    

    The backup file will be available at the default backup location specified during Analysis Service installation.

  2. Backup the database ‘mydatabase’ to a file ‘mydb.abf’ at the location ‘D:MyFolder’ and compresses the backup file:
    C:PS> Backup-ASDatabase "D:MyFoldermydb.abf" mydatabase -AllowCompression
    
  3. Backup the database ‘mydatabase’ to a file ‘mydb.abf’ at the location ‘D:MyFolder’:
    C:PS> Backup-ASDatabase "D:MyFoldermydb.abf" mydatabase -AllowCompression -FilePassword:$pwd
    

    This compresses and encrypts the backup file.

Additional Notes