Backup database without including log files

  • Hi All,

    At a customer I have a db with a full recovery model (SQL Server 2008 R2). The customer is doing a bad job backupping the log file which has hence grown out of proportions. I've asked them to setup decent backupping or change to a simple recovery model.

    In the mean time for support purposes I want to haul over a db backup from them to a local machine. That machine has limited resources. Is there a possibility to backup a db without getting the log files with? Because currently it would take me 100gb for the log file only to restore.

    Thanks in advance,

    Taco

  • No.

    A full backup doesn't include the entire log, but when you restore it, the files will be the same size as in the source DB, so if the log file is 100GB, then you'll need 100 GB for the log file, even though it won't contain 100GB of log records

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Right. Any way to surpass creating the log without changing the server I backup from? Or the predefine a max size for the newly created log before restoring?

  • No. A full backup when restored is always the same as the database it was backed up from, including file sizes, and there is no way to override that. You also cannot not create the log file.

    You either need 100GB of space for the log, or you need something like REdGate's SQLStorageCompress that compresses SQL server files.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Too bad. I'll speed up the fight with the customer on log file backups then.

    Thanks for your swift replies!

  • On the log maintenance, maybe take a read through this: Managing Transaction Logs[/url]

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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