9.1.3.90 - Network retention applied to Local retention
PDinCA
Posts: 642 Silver 1
ONE of the 11 User databases has started to keep local backup files beyond the 8 days stipulated - more in line with the network retention of 31 days (as in, 25 days and counting). No job changes have occurred (I'm the only DBA). This applies to Full and Diff backups but not TLog backups.
This isn't coincident with the upgrade from 9.0.3 on August 14th - I have files going back to July 25th (it is August 22nd now).
The job execution log shows the network file being deleted, but not the local file.
Ideas, please?
This isn't coincident with the upgrade from 9.0.3 on August 14th - I have files going back to July 25th (it is August 22nd now).
The job execution log shows the network file being deleted, but not the local file.
Ideas, please?
Jesus Christ: Lunatic, liar or Lord?
Decide wisely...
Decide wisely...
Tagged:
Comments
Are you able to provide a copy of the log output from the last job that ran that didn't delete the database files?
Are all 11 databases backed up as part of one job?
Dan Bainbridge
Product Support Engineer | Redgate Software
Of all the databases under SQL Backup's auspices on this server, this is the only one behaving in this way.
Every backup type for every database is in a single-purpose job per DB, e.g., FULL - client_32, DIFF - client_32 and TRAN - client_32 are each separate SQL Agent jobs.
Most databases copy over the network, too, like this one.
We took this DB offline on August 24th, so the jobs are no longer running, but we have the history.
The SECOND Log File is for another DIFF, taken today, on the same SQB version (7.1.3) and its only difference is that the local and remote retentions are the same, and the log INCLUDES the two Delete entries, 1 for local and 1 for remote.
Log file 2 - local = 8, remote = 8 - deletions recorded:
Decide wisely...
Decide wisely...
Are you able to place SQL Backup into debug mode and forward on your debug log please? The instructions for turning on debug mode are below:
For a stand-alone machine:
Stop the SQL Backup Agent Service.
Using the Registry Editor (regedit) locate the following registry key:
For a default SQL Instance - HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SQLBackupAgent\ImagePath
For a named SQL Instance - HKEYLOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SQLBackupAgent<SQL Instance_Name>\ImagePath
The ImagePath key has a data value that is the path to the service executable. Modify the ImagePath key and add -sqbdebug flag to the end of path to the SQL Backup Agent executable.
For a default SQL Instance the ImagePath may like similar to this example,
"C:\Program Files\Red Gate\SQL Backup(local)\SQBCoreService.exe"
Modify to add -sqbdebug parameter, so the path becomes,
"C:\Program Files\Red Gate\SQL Backup(local)\SQBCoreService.exe" -sqbdebug
For a named SQL Instance the ImagePath may like similar to this example,
C:\Program Files\Red Gate\SQL Backup<SQL Instance Name>\SQBCoreService.exe -i <SQL Instance Name>
Modify to add -sqbdebug parameter, so the path becomes,
"C:\Program Files\Red Gate\SQL Backup\ <SQL Instance Name>\SQBCoreService.exe -i <SQL Instance Name>" -sqbdebug
Restart the SQL Backup Agent Service.
A log text file called SQBCoreService_log.txt will be created in the Program Files folder, C:\Program Files\Red Gate\SQL Backup(local)\ or C:\Program Files\Red Gate\SQL Backup\ <SQL Instance Name>.
A second log file called SQBCoreServiceCopyManager_log.txt will also be created
Do not open the SQL Backup GUI unless it is really necessary, as this will only add unrequired entries to the log file.
Let the debug mode run for the problem period.
For a Cluster, the steps above still apply, but disable the SQL Backup Cluster Resource in the Cluster Administrator before stopping the SQL Backup Agent Service for the active node of the cluster. Once you have generated the requested file etc, remember to bring backup on line the SQL Backup Cluster resource. This prevents the cluster from failing over when you stop the SQL Backup Agent Service in Step 1 of the above process.
Dan Bainbridge
Product Support Engineer | Redgate Software
Upon completion, I still have files locally going back to August 7th - 30 days ago.
Decide wisely...
So it looks like The primary backup folder is
'\\je-sofs1\SQLBackup\<database>\<AUTO>.sqb'
and the copy to folder is
'\\Apollo\ApolloSQLBackup\shopko_32''
And you are using both ERASEFILES and ERASEFILES_REMOTE. However, the value for ERASEFILES_REMOTE is used when both the primary and copy to folders are remote folders. To differentiate between the two, use ERASEFILES_PRIMARY and ERASEFILES_SECONDARY instead e.g.
EXEC master..sqlbackup '-SQL "BACKUP DATABASE [shopko_32] TO DISK = [\\je-sofs1\SQLBackup\<database>\<AUTO>.sqb] WITH ERASEFILES_PRIMARY = 8, ERASEFILES_SECONDARY = 31, FILEOPTIONS = 4, CHECKSUM, DISKRETRYINTERVAL = 30, DISKRETRYCOUNT = 10, COMPRESSION = 4, COPYTO = [\\Apollo\ApolloSQLBackup\shopko_32], INIT, THREADCOUNT = 6, VERIFY, DIFFERENTIAL"'
Dan Bainbridge
Product Support Engineer | Redgate Software
Where in SQB is the ability to change that command parameter to use the _PRIMARY extension?
Perhaps SQB should use ERASEFILES and ERASEFILES_PRIMARY synonymously if we have no UI means of differentiating, and especially for those using a storage appliance, which are becoming more deployed, (even at Microsoft - they use the same appliance, I'm told).
I don't think I'll be visiting all the backup jobs just to change that parameter, BTW. I have no guarantee that if I later use the SQB UI to edit any job, the overrides I painstakingly went through won't be nuked... When recently fully loaded, that server had a dozen or more DBs, each with three scheduled jobs, all using ERASEFILES and most using ERASEFILES_REMOTE.
Requesting an enhancement to SQB to automatically handle, or give the User the option of using, the _PRIMARY command-version as needed. Hand-editing is not a viable workaround.
Decide wisely...
I have added your request to an existing Bug Report SB-4556. I will update this forum post when I get some further information on this.
Dan Bainbridge
Product Support Engineer | Redgate Software