Question

selective copy for psql/psql

  • 17 January 2024
  • 2 replies
  • 62 views

Userlevel 1
Badge +7

Hi! 

Trying to understand selective copy connected with database agents (mysql and psql). My config is : 

  • two storage polices (one from data and one for log) 
  • full aux copy from primary to secondary DC
  • selective copy to tape (for both log and data SP; first full backup each week with 4 week retention, first full backup each month with 6 months extended retention) 

What we see is not consistent across DBA agents and logs are not always copied as we would expect together with data ; 

  • postgres (FS based) write data and logs to separate storage polices, selective copy works as expected
  • psql (with intelisnap) not execute log backup during full, logs are not copied to offsite copy, recovery need to based only on logs present on filesystem during snapshot
  • mysql (by xtrybackup) is doing log backup to same SP during full, so logs are not in storage policy in what we expect to be and are not copied to offsite copy, during recovery only data is restored

Do we have any guidance on above? Or configuration is too complicated and i should use one storage policy for data and logs? 


2 replies

Userlevel 6
Badge +15

Hi @lborek 

Could you confirm this statement “What we see is not consistent across DBA agents and logs are not always copied as we would expect together with data”… 

So sometimes they are sometimes they aren’t or they never are? 
 

I’m a bit rusty, but selective copy types as far as i’m aware do not copy anything but ‘FULL’ job types (or Synthetic FULL). 

https://documentation.commvault.com/2022e/expert/selective_copies.html

A selective copy allows you to copy specific full backup jobs from a source copy. The source copy can be a primary, a synchronous copy or a selective copy


If you wanted to copy all job types, you’d create a Synchronous copy https://documentation.commvault.com/2023e/expert/synchronous_copy.html

In a synchronous copy, all backup jobs (full, incremental, differential, transaction log or archive job) that are written to the primary copy are copied. An auxiliary copy operation must be performed to replicate the data to the secondary copy.

Also, just to confirm this statement “two storage polices (one from data and one for log)”, you mean two storage policy copies or two independent storage policies altogether?

Regards,

Chris 

Userlevel 1
Badge +7


Also, just to confirm this statement “two storage polices (one from data and one for log)”, you mean two storage policy copies or two independent storage policies altogether?

Two storage polices : XXX_DATA (with deduplication) and XXX_LOG without deduplication. 

A selective copy allows you to copy specific full backup jobs from a source copy. The source copy can be a primary, a synchronous copy or a selective copy

Need selective copy in order to pick first weekly/monthly full (from XXX_DATA) and corresponding log job from XXX_LOG. 

 

Let me paste an example : 

 

Postgres works as I’d expect : DB files backup do DATA SP, log to LOG SP and log job type is full so selective copy “glue” data and log together and pick for offsite copy. 

 

Postgres (with inteli snap) does not execute log backup together with full, so logs selective copy is not possible. 

 

 

 

MySQL full (client is configured to use DC5_MYSQL_DATA_SP and DC5_MYSQL_LOG_SP, but during full both log and data goes to DATA SP, so selective copy do not pick it to offsite copy). Normal transaction log jobs (not executed with full) are correctly protected by LOG SP. 

 

 

During restore from offsite copy : 

Description: Data for Job [XXX] is not available on Storage Policy [DC5_MYSQL_LOG_SP] Copy [3_Offsite]. Please run auxiliary copy to copy the job to selected copy.

 

 

Reply