Backup file size

I run a script to backup my databases. The critical lines of code are:

OSQL -U sa -P password -S ServerName -Q "BACKUP DATABASE StoreOps TO DISK 'C:\RMS Backup\DailyBackup1.bck' WITH FORMAT, STATS

And a second line just like the first for database HQ and filename DailyHQBackup.bck

The files generated are 107MB (Store Ops) and 196MB (HQ).

Recently I executed a 'no going back' query so I manually backed up my database. I don't normally check the file size when I do this sort ofthing, but last night my backup media (DVD-RW) ran out of space...

The HQ Admin-generated backup file is nearly 2GB!

Is my batch file working? Are my backups worth the disk space they consume? I haven't had to restore from one in a long time, and I hope I don't have to--but I still want a working backup.

Ideas?

Tom

Reply to
Terrible Tom
Loading thread data ...

TT, Your script looks just like mine except for the "WITH FORMAT, STATS" What does that do, and should I be adding to my backup script? Craig

Reply to
Craig

Umm. I don't know. I copied the script from a post I found in the Google archive after seeing some reference to it in another post from long ago...

After looking into it, FORMAT & STATS only apply to removeable media and possibly only to tape backups. I will be removing those from my script since I backup to the C: drive just before my DVD backup starts.

No wisdom about the file size, eh?

What size are your backup files? Have you ever restored from one?

Tom

Reply to
Terrible Tom

My most recent backup is 789mb . I restore from my backups all the time. I take copies of my backups home to run reports. I also want to make sure that I can restore from backup, so I will restore every once in a while just to check. Craig

Reply to
Craig

Tom, how big are your database files? Your backup "should" be if clean, and a new file being generated the size of your database - free space available that is in the database. So if you have a 200mb database file size with say 10% of free space, your backup file should be about 180mb. Check also your log file space and make sure that is cleaned up. Sounds like you are either appending to your backup, or something else wierd is going on. Mike

Reply to
Mike G

Mike,

My HQ database is 2056MB with a Tom, how big are your database files?

Reply to
Terrible Tom

SO I deleted old worksheets in an attempt to reduce the HQ database size. I had been keeping quite a history. I usually deleted everything older than 90 days at the beginning of every month. This morning I deleted everything older than 30 days--right after I got the stats in the previous post--and my database size actually grew by nearly 300MB!

What gives?

"Terrible Tom" wrote:

Reply to
Terrible Tom

formatting link
- autoshrink

formatting link
- shrinkdatabase

Reply to
root

Have you tried running a Winzip type program after the backup is complete before you write to Disk." Believe me you want your backup."

Paul H Eastern Nati> SO I deleted old worksheets in an attempt to reduce the HQ database size. I

Reply to
Paul Houston /

WITH INIT

Reply to
hansv

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.