Results 1 to 4 of 4
-
09-12-2012, 05:58 PM #1Newcomer
- Join Date
- Sep 2012
- Posts
- 1
- Thanks
- 0
- Thanked 0 Times in 0 Posts
Force a log backup when Full Finishes.
We are looking for a way to automatically start a log backup as soon as the our Full backup finishes in order to truncate the logs. What is the proper way to do this? Do we just edit the sqlfull.cmd and add a command for log backup after the full?
-Andrew
-
09-13-2012, 12:16 PM #2Moderator
- Join Date
- Aug 2005
- Location
- Somewhere in the US
- Posts
- 5,303
- Thanks
- 2
- Thanked 138 Times in 136 Posts
I don 't understand completely what you want.
FULL backups normally (as default) deletes transcation logs after completion unless specifically told not to.
If you are asking if it is possible to do LOG backups after FULLS, yes you can by running the SQLLOG.cmd script. You can run this as many times as you want either through TSM scheduler or through other schedulers.Ed
-
09-27-2012, 04:08 AM #3Newcomer
- Join Date
- Mar 2009
- Location
- Norway
- Posts
- 6
- Thanks
- 3
- Thanked 0 Times in 0 Posts
Make your schedule for that server run a .cmd-file
I've included an example for a MS SQL Cluster, with the instance on S:, where we put the dsm.opt, tdpsql.full, logs for that instance and our batch-files like S:\TSM\SQLFull.cmd and S:\TSM\SQLLog.cmd
In TSM:
DEFine SCHedule <DOMAIN> <SCHED-NAME SQL FULL BACKUP> Type=Client DESCription="Backup of SQL instance on S:" ACTion=Command PRIority=5 STARTTime=21:00 DURation=2 SCHEDStyle=Classic OBJect="S:\TSM\SQLFull.cmd"
DEFine SCHedule <DOMAIN> <SCHED-NAME SQL LOG BACKUP> Type=Client DESCription="Logbackup of SQL instance on S:" ACTion=Command PRIority=5 STARTTime=22:00 PERIOD=1 Perunits=hour DURUnits=minutes DURation=15 SCHEDStyle=Classic OBJects="S:\TSM\SQLLog.cmd"
On SQL Server, create to .cmd-files:
SQLFull.cmd:
set sql_dir=C:\Progra~1\Tivoli\TSM\TDPSql
set sql_opt=S:\tsm
C:
cd %sql_dir%
date < NUL >> %sql_opt%\sqlsched.log
time < NUL >> %sql_opt%\sqlsched.log
REM Start Full Backup
%sql_dir%\tdpsqlc backup * full /tsmoptfile=%sql_opt%\dsm.opt /config=%sql_opt%\tdpsql.cfg /logfile=%sql_opt%\sqlfull.log >> %sql_opt%\sqlsched.log
echo %date% %time% >> %sql_opt%\sqllog.log
Rem Start Log Backup
%sql_dir%\tdpsqlc backup * log /tsmoptfile=%sql_opt%\dsm.opt /config=%sql_opt%\tdpsql.cfg /truncate=yes /logfile=%sql_opt%\sqllog.log >> %sql_opt%\sqllog.log
SQLLog.cmd:
set sql_dir=C:\Progra~1\Tivoli\TSM\TDPSql
set sql_opt=S:\tsm
C:
cd %sql_dir%
echo %date% %time% >> %sql_opt%\sqllog.log
Rem Start Log Backup
%sql_dir%\tdpsqlc backup * log /tsmoptfile=%sql_opt%\dsm.opt /config=%sql_opt%\tdpsql.cfg /truncate=yes /logfile=%sql_opt%\sqllog.log >> %sql_opt%\sqllog.log
-
11-25-2012, 11:38 AM #4Newcomer
- Join Date
- Jul 2010
- Location
- Belgium
- Posts
- 18
- Thanks
- 0
- Thanked 0 Times in 0 Posts
Full backup will not truncate the transaction log, it will only backup the active transactions part of the log. I don't understand why you would do a log backup just after a full btw?
You will have a potential risk of losing one day of work for your db's. If you would schedule the log backup(or even multiple) in the day you have less risk. If risk is not an issue, why not putting the db(s) in simple mode? That way you don't have to worry about the log.
Dennis
Similar Threads
-
Log backups being removed from TSM after last full backup
By Chad7480 in forum Microsoft SQL ServerReplies: 5Last Post: 12-16-2010, 04:14 PM -
TDP SQL Full+Diff+Log backup policy
By tatuinf in forum Microsoft SQL ServerReplies: 6Last Post: 08-07-2010, 03:12 PM -
Windows Backup finishes -- no results summary, no new schedule
By tggilkey in forum Backup / Archive DiscussionReplies: 0Last Post: 07-03-2008, 03:34 PM -
TDP SQL full+log backup, need help!
By Pamoramone in forum TDP/Application Layer BackupReplies: 2Last Post: 03-16-2007, 11:15 AM -
Can I force Tivoli to always do full backups
By wchavis in forum Backup / Archive DiscussionReplies: 3Last Post: 09-25-2006, 09:08 AM


Reply With Quote
