Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 backup database

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2007-04-29 : 03:01:45
if i run BACKUP DATABASE test TO testbackup
GO

does this do a full backup?
will this overwrite the backup on that device?
is there anyway to keep creating new backups everytime it is run?
is there a way to compress the backup?

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-04-29 : 10:39:13
FROM BOL:
quote:

BACKUP DATABASE:
Backs up a complete database, or one or more files or filegroups (BACKUP DATABASE). Also, under the full recovery model or bulk-
logged recovery model, backs up the transaction log (BACKUP LOG).




_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-04-29 : 13:10:14
>> does this do a full backup?
yes

>> will this overwrite the backup on that device?
no since default is noinit

>> is there anyway to keep creating new backups everytime it is run?
backup db with maintenance plan, or use 'with init' option in backup statement

>> is there a way to compress the backup?
use third party sql backup tools, or zip backup file yourself
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-04-30 : 04:14:53
">> is there anyway to keep creating new backups everytime it is run?
backup db with maintenance plan, or use 'with init' option in backup statement
"

... plus you would need to generate a "unique filename" for the backup

">> is there a way to compress the backup?"

You could set the Backup Folder to Compressed - if you are just wanting to save space on the server. If you want a compressed-file to reduce bandwidth when transferring elsewhere then as rmiao has suggested.

Kristen
Go to Top of Page
   

- Advertisement -