Results 1 to 4 of 4
  1. #1
    Newcomer
    Join Date
    Sep 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 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

  2. #2
    Moderator moon-buddy's Avatar
    Join Date
    Aug 2005
    Location
    Somewhere in the US
    Posts
    5,903
    Thanks
    4
    Thanked 231 Times in 226 Posts

    Default

    Quote Originally Posted by ThePravus View Post
    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
    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

  3. #3
    Newcomer
    Join Date
    Mar 2009
    Location
    Norway
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    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

  4. #4
    Newcomer
    Join Date
    Jul 2010
    Location
    Belgium
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

  1. Log backups being removed from TSM after last full backup
    By Chad7480 in forum Microsoft SQL Server
    Replies: 5
    Last Post: 12-16-2010, 04:14 PM
  2. TDP SQL Full+Diff+Log backup policy
    By tatuinf in forum Microsoft SQL Server
    Replies: 6
    Last Post: 08-07-2010, 03:12 PM
  3. Windows Backup finishes -- no results summary, no new schedule
    By tggilkey in forum Backup / Archive Discussion
    Replies: 0
    Last Post: 07-03-2008, 03:34 PM
  4. TDP SQL full+log backup, need help!
    By Pamoramone in forum TDP/Application Layer Backup
    Replies: 2
    Last Post: 03-16-2007, 11:15 AM
  5. Can I force Tivoli to always do full backups
    By wchavis in forum Backup / Archive Discussion
    Replies: 3
    Last Post: 09-25-2006, 09:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •