Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


backup


backup

Author
Message
charipg
charipg
Mr or Mrs. 500
Mr or Mrs. 500 (506 reputation)Mr or Mrs. 500 (506 reputation)Mr or Mrs. 500 (506 reputation)Mr or Mrs. 500 (506 reputation)Mr or Mrs. 500 (506 reputation)Mr or Mrs. 500 (506 reputation)Mr or Mrs. 500 (506 reputation)Mr or Mrs. 500 (506 reputation)

Group: General Forum Members
Points: 506 Visits: 1193
My sql srver job for sql backup every time appending the backup file and 4 GB database size backup now is 108 GB.Please tell which option i can use for create another file daily , the backup file should not append or delete the first one,it should create another backup file daily.
o.fimin
o.fimin
SSC-Addicted
SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)

Group: General Forum Members
Points: 405 Visits: 358
You must change the backup file name in your BACKUP instruction.
For example, add the date to the backup file name
Grant Fritchey
Grant Fritchey
SSCoach
SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)

Group: General Forum Members
Points: 17609 Visits: 32267
Or use INIT and FORMAT with the backup command to make it always be a single file instead of a series of files stacked together.

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

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
Ed Wagner
Ed Wagner
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10315 Visits: 9594
I use both of the above suggestions. The standard backup filename always contains the date and the SQL command that performs the backup contains WITH INIT to ensure the backup stands alone. I know this may not be applicable to all environments, but I like to keep things simple with one backup per file.


Tally Tables - Performance Personified
String Splitting with True Performance
Best practices on how to ask questions
Grant Fritchey
Grant Fritchey
SSCoach
SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)

Group: General Forum Members
Points: 17609 Visits: 32267
Hey Ed, make sure you use FORMAT in addition to the INIT statement. INIT doesn't rewrite the header, so if you ever do modify the backup being done in some fashion you could end up with a backup that can't be restored. I just found out about this one myself recently.

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

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
Ed Wagner
Ed Wagner
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10315 Visits: 9594
Grant Fritchey (1/21/2014)
Hey Ed, make sure you use FORMAT in addition to the INIT statement. INIT doesn't rewrite the header, so if you ever do modify the backup being done in some fashion you could end up with a backup that can't be restored. I just found out about this one myself recently.

Interesting...thank you, Grant. I read the MSDN descriptions of them and INIT replaces any backup sets, but preserves an existing media header on the device. FORMAT specifies that the media header should be rewritten.

I'm interpreting this to mean that when I take a full backup of each database to its own unique file on disk and never share backup files, then there's never a media header to rewrite. Am I reading this correctly? Or did I miss something?


Tally Tables - Performance Personified
String Splitting with True Performance
Best practices on how to ask questions
Grant Fritchey
Grant Fritchey
SSCoach
SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)

Group: General Forum Members
Points: 17609 Visits: 32267
Ed Wagner (1/21/2014)
Grant Fritchey (1/21/2014)
Hey Ed, make sure you use FORMAT in addition to the INIT statement. INIT doesn't rewrite the header, so if you ever do modify the backup being done in some fashion you could end up with a backup that can't be restored. I just found out about this one myself recently.

Interesting...thank you, Grant. I read the MSDN descriptions of them and INIT replaces any backup sets, but preserves an existing media header on the device. FORMAT specifies that the media header should be rewritten.

I'm interpreting this to mean that when I take a full backup of each database to its own unique file on disk and never share backup files, then there's never a media header to rewrite. Am I reading this correctly? Or did I miss something?


No, you didn't miss anything, but I'm a belts & suspenders kind of guy. Just because you're not rewriting the header doesn't mean you'll never rewrite the header and having it built right in doesn't hurt anything on a one-off backup... You're fine your way, but it's a good thing to know.

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

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
Ed Wagner
Ed Wagner
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10315 Visits: 9594
Grant Fritchey (1/21/2014)
Ed Wagner (1/21/2014)
Grant Fritchey (1/21/2014)
Hey Ed, make sure you use FORMAT in addition to the INIT statement. INIT doesn't rewrite the header, so if you ever do modify the backup being done in some fashion you could end up with a backup that can't be restored. I just found out about this one myself recently.

Interesting...thank you, Grant. I read the MSDN descriptions of them and INIT replaces any backup sets, but preserves an existing media header on the device. FORMAT specifies that the media header should be rewritten.

I'm interpreting this to mean that when I take a full backup of each database to its own unique file on disk and never share backup files, then there's never a media header to rewrite. Am I reading this correctly? Or did I miss something?


No, you didn't miss anything, but I'm a belts & suspenders kind of guy. Just because you're not rewriting the header doesn't mean you'll never rewrite the header and having it built right in doesn't hurt anything on a one-off backup... You're fine your way, but it's a good thing to know.

Good deal. Thanks for the information; it never hurts to know more, until your brain hits critical mass anyway. :-P


Tally Tables - Performance Personified
String Splitting with True Performance
Best practices on how to ask questions
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search