Quantcast
Channel: Software Communities : Popular Discussions - vRanger
Viewing all articles
Browse latest Browse all 1662

How to force Ranger to perform a Full backup on a particular day of the week

$
0
0

I was looking for a solution with the minimum impact and the following one seems to be working pretty well.

First of all, this is not an official approach, Developers are working on this feature and sooner or later we will see it in the product.

This is a SQL script that modifies Ranger stored procedure (vz__SavePointSelectByTemplateIDAndVmUuidAndIsDeleted). It exploits one of the Full-backup triggers, VM disk size change to be exact. Sounds scary, right? No actual changes are made to either VM or DB:

  • script submits ‘forged’ parameter if specific conditions are met,
  • Ranger bites,
  • script reverts changes.

What are the conditions when the script ‘forges’ parameter? Here they are: 

  1. Job is defined as Differential or Incremental.
  2. forcedFull tag is defined in the job description field and Job start time matches day of the week defined in the tag.
  3. At least 1 savepoint for a given VM included in the job template exists and threshold defined in the job configuration is not met. (If threshold is met the script lets Ranger do its job and create Full SP.)

Instructions:

  1. Run (once) forcedFull_01.sql script against Ranger DB
  2. Modify Job Description to define day of the week when you would like Ranger to run Full backup. Format is <forcedFull = day_of_the_week> (e.g. <forcedFull = Sunday>)
  3. Let scheduled job run.

 

If you don’t like the script and want to roll back:

To revert and use standard procedure re-run following script:

Filename:     CreateCustomStoredProcedures.sql

Location:      x:\Program Files (x86)\Quest Software\vRanger\Service\vRangerProDBUpgradeScripts

 

In the attached word document you can find diagrams and notes for 2 standard scenarios.

I have tested this script against non-English installation. Here are details:

Ranger is installed on Server 2008R2 Spanish edition:

1. Ranger DB is attached to included English version of SQL Express. You need to use forcedFull format described above.

2. Ranger DB is attached to Spanish version of SQL Express (separate installation). Day of the week should be in Spanish, e.g. <forcedFull = domingo>.

 

This post is open for vote, questions and comments.


Viewing all articles
Browse latest Browse all 1662

Trending Articles