views:

406

answers:

4

I want to implement an automated backup system for my site's SQL Server 2005 DB that will backup nightly to Amazon's S3 service. But since S3 charges both for space and bandwidth used, I would like to minimize the size of the files that I transfer in. What is the best way to achieve this?

I should clarify that I'm not really talking so much about compression, which is pretty straightforward, but concerning backup strategies like whether to do differential backups all the time, whether I need to copy transaction logs, etc.

A: 

Either use a commercial product do compress the backups like Red Gate Backup Pro or just zip-compress it after you're done.

Jonas Lincoln
A: 

Write a .batch script or powershell script that will find the file/s created in the past day and zip them up. Then FTP or whatever you have to do.

Sam
+1  A: 

Differential backups will be smaller than full backups, of course. However, you should consider the restoration side as well. You'll need your last full backup as well as your differentials to perform the restore which can add up to a lot of bandwidth/transfer time for a restore. One option is to perform a full backup weekly and do differentials daily (or a similar type of schedule).

As for transaction logs, it depends on what granularity you're looking for in restoring your data. If restoring to the last full or differential backup is sufficient, then you don't need to worry about taking transaction log backups. If that's not the case, then transaction log backups will be necessary.

Sean Carpenter
You should backup the transaction log anywise, otherwise the log will grow forever. You could of course throw the log files away if they aren't needed.
Jonas Lincoln
If you're sure you don't need transaction log backups, you can set the database recovery model to "Simple" to avoid having to make log backups.
Sean Carpenter
A: 

A powershell example that I just came across.