TLOG backup vs full database backup

  • What is the difference between tlog and db backup.  can I recover from either?  Do both truncate the tlog when complete?  Thank you.

     

     

    David

    Best Regards,

    ~David

  • First of all you'll need a full db backup !

    After that, you can perform T-log backups. Keep in mind you'll need the set (logbackup1, logbu2,...) to be able to restore to the latest log-backup.

    See Books Online for more info regarding Backup and database recovery modes !

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Tlog backups backup all of completed transactions that were made in the database since the last backup.  When you restore a tlog backup, you are performing the transactions again on the database.  As alzdba pointed out, you need a full backup to start with before you can start applying (restoring) tlog backups.  Again to re-iterate, you have to restore tlog backups in the order of which they were backuped up:

    Possible ordering of a restore might be:

    Full db backup (which was performed at midnight)

    Trans Log backup # 1 (which was backed up at 8:00 am)

    Trans Log backup #2 (which was backed up at 1:00 pm) ... and so forth

     

    A full db backup backups the entire database at the time of the backup.

    I sort of think of tlog backups as a quick (usually!) way to backup the database (sometimes full backups can take a while) w/o affecting performance so that I have a backup to fall back to in case I don't make it to my next full backup scheduled time. 

    Not sure what kind of database you have and how often you make changes, but I do a full backup every night and perform 2 trans log backups during normal business hours.  We don't have ALOT of transactions during the day so this works just fine for me.  However, your backup schedule will depend on the # of transactions hitting your db. 


    Have a good day,

    Norene Malaney

  • Just to answer your last question, a full db backup will not truncate the log.  You need to do a tlog backup to truncate the inactive portion of the log.  

  • Thanks for all the input.  This really help a lot.  Have a great day!

    Best Regards,

    ~David

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply