Skip to Content
Technical Articles

How to automatically backup/archive & restore your plan data


In current release of SAP analytics cloud, only unpublished data of a user’s private version can be restored by using the Version History feature.
For published data in a public version, there is still no restore feature yet.

As alternative, you could enable the Data Audit feature and download the Data Changes audit records, and then try to re-uploaded…. But this is a very time-consuming and very error-prone manual task.

A far better option would be to periodically copy your published version data to a backup/archive model. But until recently, this could not be automated easily.

An automated backup/archive and restore

Here comes an easy automated way to backup/archive and restore your SAP Analytics Cloud Planning model (fact) data.

Step 1. Create new archive model

Create a model as a copy of your existing planning model and add one more additional Date type dimension that you can name “Date Archived” with ‘Day’ granularity.


Step 2. Create a new data action to Archive

New data action on your new archive model with 2 advanced formula steps.
(In parameters, I’ve hardcoded the Target Version to ‘Actual’ for simplicity reasons)

Data Action Step: ARCHIVE_DATA

// Store new Data Archive on today's date of all values in the "Actual" version
DATA() = LINK([MyPlanModel],[d/Version]="public.Actual",[d/Account]=[d/Account],[d/Product]=[d/Product])

Note that Version, Account and Product dimensions are local dimensions, which means you have to specify them in the LINK() formula. This not needed for Public dimensions.



// Delete Archived data older than 30 days, and not taken on the first day of the month
// What will remain is: daily backup (last 30 days) and monthly backup (on 1st day of the month)
IF [d/DateArchived].[p/DAY] != "1"  THEN


Step 3. Create a new Data Action to Restore a backup/archive

To restore your data back from your archive model into your planning model

Make sure to add a parameter “ArchiveDay” to prompt for the Day you want to archive from:

Data Action Step: RESTORE

// Restore data from the archive model on a certain day
DATA() = LINK([MyPlanModel_Archive],[d/Version]="public.Actual",[d/DateArchived]=%ArchiveDay%,[d/Account]=[d/Account],[d/Product]=[d/Product])


Step 4. Create a story to test the Data Actions!



Until SAP Analytics cloud provides a better standardized solution, this automated daily backup/archive approach can help you in the mean time.

You must be Logged on to comment or reply to a post.
  • Nice one Jef! At one of my projects I setup a similar concept after a "planning accident" where I indeed had to do a manual restore from the audits. In addition I used the calendar feature to schedule several data actions for automatic daily, weekly and monthly backup.



    • Not sure what you mean, this is only about transaction data values.
      Maybe you miss a filter in your report. You can check in your backup model (data foundation view) if you see the records copied over.

      • I should have been clearer. Apologies. When I used the data/link formula from my source model into the target model, all of the dimensions went over to that model but my values all showed up 0. It didn't copy the account dimension. I see all of the line items as expected but no values to any of the lines.

        • I have no idea what you mean with dimensions go over. But are you using a 'new' advanced model? Because there are still some weird limitations reg. Zero handling & null suppression with the new model. Maybe that has an effect. Did you check in the model data foundation as suggested?

          • It turned out, I was copying a model that was "classic" into a new model that is "new model". SAC has now disabled the ability to go from the old model to new to avoid these issues!