Database Backup

  • Hi,

    I have a huge database whose backup file goes around 20 GB, because we store all documents in image format into the table.

    Since we need to backup this DB everyday, this requires a lot of space in server.

    All i want to do is:

    1. Back whole database without that single table every day.

    2. Back up that single table separately as separate bak file.. may be every week.. if possible in separate server.

    Is there any way we can do this in MN SQL?

    Thanks in advance.

  • Sachin,

    SQL Server does not have an option to backup a table as a .bak file. You can make use of SSIS to export the tables.

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • Hi Pradeep~,

    Thanks for the reply.

    My document table is about 10+ GB with Image column in it. I don't know exporting this table in a file works for me.

    Also, Do you know if we can backup database with our that 1 table? If we can please do let me know..

    Thanks

    ~Sachin

  • Native backups to disk does not support excluding objects. SSIS is a good option for you to export the table to another database.

    You can create a database to store the single exported table and then take the backup of that table to disk.

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • Thank You Pradeep!!

    I appreciate your comments...

    Sachin

  • It seems like a big database. You can also consider 3rd party tools like LiteSpeed which can help you backup/restore one table.

    Ofcourse it is a license tool.

    If licensing is problem , SSIS is the best option.

  • You could split that one large table into a separate filegroup, then use filegroup backups to backup the two filegroups separately, which should do what you're looking for.

  • ^ This.

    Sachin, what Keith said above is your best practice, and should usually be done anyway when dealing with LOB data (VARCHAR(MAX), text, Image, etc.) LOBs behave annoyingly when it comes to their storage, and it's best to try to keep them out of the rest of the data, at least anything that won't store in-row.

    Look into filegroup backups, and also into differential backups. The two combined should help your storage issues immensely.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • Unless I'm reading this wrong, 20gb is very small as databases go. I agree that seperating out the storage to different filegroups would allow you to break up the backup process. You might also consider looking at SQL Server 2008 and the FileStream as a means of moving the LOB out of your database and into a file system. But if you're hitting serious space issues at 20gb, I'd strongly recommend getting some more disk space. I picked up a 2tb external drive for $90. I wouldn't recommend that for a data drive for a system, but it might be a good place for storing backups, especially on what sounds likea commodity system.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • I have to agree 20gb is not large at all - I would concentrate on getting enough space for a standard backup before worrying about any other options outlined

  • 20GB, as Grant mentioned, isn't large. However if you are considering this to be a small system that is growing, I would split the table to a separate filegroup and then run filegroup backups.

    Make sure that you practice restoring so that you understand how to restore a filegroup separately from another.

  • Steve Jones - SSC Editor (1/18/2011)


    20GB, as Grant mentioned, isn't large. However if you are considering this to be a small system that is growing, I would split the table to a separate filegroup and then run filegroup backups.

    Make sure that you practice restoring so that you understand how to restore a filegroup separately from another.

    Excellent point. Yes, practice doing the restores if you're deviating from a simple standard full backup.

    Of course, you should practice restoring the full backup too.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Thanks All for the helpful comments and suggestions.

    Yes we are small company but 20GB is our database for a single self hosted client.

    Since this database size will keep on increasing, that is what i am worried about.

    I will do some research on filegroup backup and work on it..

    Thanks once again...

    SQLServerCentral.com is a great help for me..

    ~Sachin

Viewing 13 posts - 1 through 12 (of 12 total)

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