PBCS Cheap Tricks – Quick and Easy Backup Process

mike falconer
brovanture consultant

The November 2018 PBCS update for EPM Automate has come with a neat new command that can really streamline your rolling backup process. Introducing: renameSnapshot. Here’s the definition, straight from the horse’s mouth

As you will know, PBCS creates a daily snapshot during your maintenance window, the timing of which you can manage using the PBCS Application Settings. This recently got its own card in PBCS:

The daily maintenance window creates a backup of your application called the Artifact Snapshot. As Oracle suggests above, if you rename this backup using a simple EPM Automate script with a timestamp, then you have a daily rolling backup process stored entirely in the cloud.

How many backups will be kept? Again, straight from the horse’s mouth:

So, you have two limitations. The maximum size of the pod cannot exceed 150GB, and snapshots will be removed after 60 days regardless of size. Usually a backup will be smaller than the true application, so you can realistically expect Oracle to keep at least two weeks’ worth of rolling backups.

So how do we recommend using this new tool? My suggestion would be to move your daily rolling backup to the cloud, and simply download the snapshot once a week instead, on a consistent day. This reduces the storage space requirement on your automation server which your IT team will thank you for, and makes it much faster to restore recent backups which your users will thank you for.

Here’s my recommendations for the EPM Automate parts of both scripts. We have some additional email functionality and error checking which I’ve stripped out for ease of understanding:

Daily Backup Script (run after your maintenance window every day except Sunday)

call epmautomate login %USER% %PASSWORD_FILE% %URL% %ID_DOMAIN%

call epmautomate renamesnapshot “Artifact Snapshot” “~Backup %YYYY%-%MM%-%DD% 1:00am”

call epmautomate logout

Weekly Script (run only on Sundays, the same script as above with a line inserted before logout)

call epmautomate downloadfile “~Backup %YYYY%-%MM%-%DD% 1:00am”

I’ve preceded the new name with ~ as this is after the alphanumeric characters in the Unicode alphabet, so the backups will neatly appear at the bottom of your snapshot window. They’ll also be ordered nicely by year, month and day with the most recent at the bottom. Rather than use the current time when the script is run, I hardcode in our maintenance snapshot window time so there’s no confusion as to when the backup refers to.

This creates the nice, stacking system at the bottom of your screen.

Fun Fact – as you’ll see from my 15th November backup (which I created myself to simulate multiple days running, please forgive me), you can’t manually rename a snapshot to contain a colon, however you can do it via EPM Automate. This adds protection against cheeky users messing with your backups.

So there you have it! You’re now protected against accidental data clears and protected against Oracle suffering a critical failure as you can restore one of your saved backups. Here at Brovanture we can set this up for you with additional controls with lovely confirmation emails to keep you confident in your backup procedures:

As ever, use our email message form, which can be accessed at the side of every page on our website to contact me.