SSAS database backup

kumar-9444 121 Reputation points
2020-09-17T07:30:58.713+00:00

I tried to backup SSAS databases (2008 R2) by using query in SSMS, but it is overwriting previous day's backup. How to take backup without overwriting previous backup. I need to maintain at least 7 days of backup. Currently I schedule a job in SQL Server Agent which overwrites daily backup.

This is the job step definition

<Backup xmlns="schemas.microsoft.com/analysisservices/2003/engine"> <Object> <DatabaseID>OLAP_Test</DatabaseID> </Object> <File>K:\OLAP Database Backups\SSAS\OLAP_test.abf</File> <AllowOverwrite>true</AllowOverwrite> </Backup>

SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
1,252 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Olaf Helper 41,806 Reputation points
    2020-09-17T11:44:38.45+00:00

    <File>K:\OLAP Database Backups\SSAS**OLAP_test.abf**</File> <AllowOverwrite>true</AllowOverwrite>

    That <File> parameter is the backup file and it is a fix name in your XMLA command. Unfortunately you can't make it dynamically in a job step, you have to find an other backup solution, like:
    https://sqlpowershell.blog/2013/06/05/ssas-cube-backup-strategies-and-step-by-step-approach-to-setup-and-configure-backup/
    http://www.ssas-info.com/analysis-services-scripts/2679-script-to-backup-ssas-database-and-delete-old-backup-files

    0 comments No comments

  2. m 4,271 Reputation points
    2020-09-18T03:56:49.58+00:00

    Hi @pradeep-9444,

    Please do it with PS: 28761.ssas-discuss-various-backup-methods-automating-cube-database-s-backup-with-powershell

    BR,
    Mia


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Olaf Helper 41,806 Reputation points
    2020-09-18T06:42:31.693+00:00

    Or you can use this PowerShell script in an Agent job step: Backup Ssas Databases with SessionTrace Output

    0 comments No comments

  4. m 4,271 Reputation points
    2020-09-21T01:53:32.163+00:00

    Hi @pradeep-9444,

    Is the reply helpful?

    BR,
    Mia


    If the answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments