Database backup - Use case of FORMAT and INIT
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
2
down vote
favorite
I understand that FORMAT looks at mediaset level and if set then creates a new media set so if there are any existing backupsets then they will no longer be available.
Also, INIT looks at backupset level and if set then overwrites the existing backupset, so if there are any existing backupset then they will no longer be available. Will it impact that backupset or all backupsets on the media set?
So how do these options work? I am trying to get an use case scenario to understand this better.
sql-server backup
New contributor
add a comment |Â
up vote
2
down vote
favorite
I understand that FORMAT looks at mediaset level and if set then creates a new media set so if there are any existing backupsets then they will no longer be available.
Also, INIT looks at backupset level and if set then overwrites the existing backupset, so if there are any existing backupset then they will no longer be available. Will it impact that backupset or all backupsets on the media set?
So how do these options work? I am trying to get an use case scenario to understand this better.
sql-server backup
New contributor
2
I disagree. I think this is accurate enough. The Docs explicitly explain the difference as one changing the media and the other changing the backup header. One replaced the file the other invalidates any striped media set.
â clifton_h
1 hour ago
@clifton_h comment deleted as the OP has been clarified.
â George.Palacios
51 mins ago
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I understand that FORMAT looks at mediaset level and if set then creates a new media set so if there are any existing backupsets then they will no longer be available.
Also, INIT looks at backupset level and if set then overwrites the existing backupset, so if there are any existing backupset then they will no longer be available. Will it impact that backupset or all backupsets on the media set?
So how do these options work? I am trying to get an use case scenario to understand this better.
sql-server backup
New contributor
I understand that FORMAT looks at mediaset level and if set then creates a new media set so if there are any existing backupsets then they will no longer be available.
Also, INIT looks at backupset level and if set then overwrites the existing backupset, so if there are any existing backupset then they will no longer be available. Will it impact that backupset or all backupsets on the media set?
So how do these options work? I am trying to get an use case scenario to understand this better.
sql-server backup
sql-server backup
New contributor
New contributor
edited 26 mins ago
MDCCL
6,34731740
6,34731740
New contributor
asked 1 hour ago
variable
1698
1698
New contributor
New contributor
2
I disagree. I think this is accurate enough. The Docs explicitly explain the difference as one changing the media and the other changing the backup header. One replaced the file the other invalidates any striped media set.
â clifton_h
1 hour ago
@clifton_h comment deleted as the OP has been clarified.
â George.Palacios
51 mins ago
add a comment |Â
2
I disagree. I think this is accurate enough. The Docs explicitly explain the difference as one changing the media and the other changing the backup header. One replaced the file the other invalidates any striped media set.
â clifton_h
1 hour ago
@clifton_h comment deleted as the OP has been clarified.
â George.Palacios
51 mins ago
2
2
I disagree. I think this is accurate enough. The Docs explicitly explain the difference as one changing the media and the other changing the backup header. One replaced the file the other invalidates any striped media set.
â clifton_h
1 hour ago
I disagree. I think this is accurate enough. The Docs explicitly explain the difference as one changing the media and the other changing the backup header. One replaced the file the other invalidates any striped media set.
â clifton_h
1 hour ago
@clifton_h comment deleted as the OP has been clarified.
â George.Palacios
51 mins ago
@clifton_h comment deleted as the OP has been clarified.
â George.Palacios
51 mins ago
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
3
down vote
FORMAT
recreates the header from scratch, effectively completely obliterating the backup file, or tape. If the backup file or tape is corrupted, this option ignores the corruption, and enables you to reuse the file or tape. From the Microsoft Docs:
FORMAT specifies that a new media set be created. FORMAT causes the backup operation to write a new media header on all media volumes used for the backup operation. The existing contents of the volume become invalid, because any existing media header and backup sets are overwritten.
INIT
rewrites field values in the header info. If the device is corrupt, this may not correct the issue. Also from the Microsoft Docs:
Specifies that all backup sets should be overwritten, but preserves the media header. If INIT is specified, any existing backup set on that device is overwritten, if conditions permit. By default, BACKUP checks for the following conditions and does not overwrite the backup media if either condition exists:
- Any backup set has not yet expired. For more information, see the EXPIREDATE and RETAINDAYS options.
- The backup set name given in the BACKUP statement, if provided, does not match the name on the backup media. For more information, see the NAME option, earlier in this section.
Please add the reference to the doc pages. There are useful remarks related to these two subjects
â clifton_h
1 hour ago
When you say "completely obliterating the backup file, or tape", do you mean it can impact the entire tape. So if tape has 5 media sets then creating a new backup with the FORMAT option will destroy entire tape? Please guide.
â variable
1 hour ago
Yes, backing up to tape usingWITH FORMAT
completely eradicates the content of the tape. It overwrites the header section of the tape, rendering the contents after that section unreadable.
â Max Vernon
1 hour ago
So if the tape were a disk drive, then would it eradicate entire disk? I thought media set meant just the .bak file...
â variable
1 hour ago
"So if the tape were a disk drive" no. ADisk
backup device is a single file, not an entire disk. For Disk backups you almost always just use a new file for each backup.
â David Browne - Microsoft
1 hour ago
add a comment |Â
up vote
0
down vote
Complementing to what Max answered, one case that I found where you need to use both FORMAT
and INIT
is when TDE is enabled for your database.
You can see my question - Unable to restore TDE enabled database when MAXTRANSFERSIZE and CHECKSUM is used and answers.
Apparently, it was a bug in sql server which the PG team confirmed :-)
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
FORMAT
recreates the header from scratch, effectively completely obliterating the backup file, or tape. If the backup file or tape is corrupted, this option ignores the corruption, and enables you to reuse the file or tape. From the Microsoft Docs:
FORMAT specifies that a new media set be created. FORMAT causes the backup operation to write a new media header on all media volumes used for the backup operation. The existing contents of the volume become invalid, because any existing media header and backup sets are overwritten.
INIT
rewrites field values in the header info. If the device is corrupt, this may not correct the issue. Also from the Microsoft Docs:
Specifies that all backup sets should be overwritten, but preserves the media header. If INIT is specified, any existing backup set on that device is overwritten, if conditions permit. By default, BACKUP checks for the following conditions and does not overwrite the backup media if either condition exists:
- Any backup set has not yet expired. For more information, see the EXPIREDATE and RETAINDAYS options.
- The backup set name given in the BACKUP statement, if provided, does not match the name on the backup media. For more information, see the NAME option, earlier in this section.
Please add the reference to the doc pages. There are useful remarks related to these two subjects
â clifton_h
1 hour ago
When you say "completely obliterating the backup file, or tape", do you mean it can impact the entire tape. So if tape has 5 media sets then creating a new backup with the FORMAT option will destroy entire tape? Please guide.
â variable
1 hour ago
Yes, backing up to tape usingWITH FORMAT
completely eradicates the content of the tape. It overwrites the header section of the tape, rendering the contents after that section unreadable.
â Max Vernon
1 hour ago
So if the tape were a disk drive, then would it eradicate entire disk? I thought media set meant just the .bak file...
â variable
1 hour ago
"So if the tape were a disk drive" no. ADisk
backup device is a single file, not an entire disk. For Disk backups you almost always just use a new file for each backup.
â David Browne - Microsoft
1 hour ago
add a comment |Â
up vote
3
down vote
FORMAT
recreates the header from scratch, effectively completely obliterating the backup file, or tape. If the backup file or tape is corrupted, this option ignores the corruption, and enables you to reuse the file or tape. From the Microsoft Docs:
FORMAT specifies that a new media set be created. FORMAT causes the backup operation to write a new media header on all media volumes used for the backup operation. The existing contents of the volume become invalid, because any existing media header and backup sets are overwritten.
INIT
rewrites field values in the header info. If the device is corrupt, this may not correct the issue. Also from the Microsoft Docs:
Specifies that all backup sets should be overwritten, but preserves the media header. If INIT is specified, any existing backup set on that device is overwritten, if conditions permit. By default, BACKUP checks for the following conditions and does not overwrite the backup media if either condition exists:
- Any backup set has not yet expired. For more information, see the EXPIREDATE and RETAINDAYS options.
- The backup set name given in the BACKUP statement, if provided, does not match the name on the backup media. For more information, see the NAME option, earlier in this section.
Please add the reference to the doc pages. There are useful remarks related to these two subjects
â clifton_h
1 hour ago
When you say "completely obliterating the backup file, or tape", do you mean it can impact the entire tape. So if tape has 5 media sets then creating a new backup with the FORMAT option will destroy entire tape? Please guide.
â variable
1 hour ago
Yes, backing up to tape usingWITH FORMAT
completely eradicates the content of the tape. It overwrites the header section of the tape, rendering the contents after that section unreadable.
â Max Vernon
1 hour ago
So if the tape were a disk drive, then would it eradicate entire disk? I thought media set meant just the .bak file...
â variable
1 hour ago
"So if the tape were a disk drive" no. ADisk
backup device is a single file, not an entire disk. For Disk backups you almost always just use a new file for each backup.
â David Browne - Microsoft
1 hour ago
add a comment |Â
up vote
3
down vote
up vote
3
down vote
FORMAT
recreates the header from scratch, effectively completely obliterating the backup file, or tape. If the backup file or tape is corrupted, this option ignores the corruption, and enables you to reuse the file or tape. From the Microsoft Docs:
FORMAT specifies that a new media set be created. FORMAT causes the backup operation to write a new media header on all media volumes used for the backup operation. The existing contents of the volume become invalid, because any existing media header and backup sets are overwritten.
INIT
rewrites field values in the header info. If the device is corrupt, this may not correct the issue. Also from the Microsoft Docs:
Specifies that all backup sets should be overwritten, but preserves the media header. If INIT is specified, any existing backup set on that device is overwritten, if conditions permit. By default, BACKUP checks for the following conditions and does not overwrite the backup media if either condition exists:
- Any backup set has not yet expired. For more information, see the EXPIREDATE and RETAINDAYS options.
- The backup set name given in the BACKUP statement, if provided, does not match the name on the backup media. For more information, see the NAME option, earlier in this section.
FORMAT
recreates the header from scratch, effectively completely obliterating the backup file, or tape. If the backup file or tape is corrupted, this option ignores the corruption, and enables you to reuse the file or tape. From the Microsoft Docs:
FORMAT specifies that a new media set be created. FORMAT causes the backup operation to write a new media header on all media volumes used for the backup operation. The existing contents of the volume become invalid, because any existing media header and backup sets are overwritten.
INIT
rewrites field values in the header info. If the device is corrupt, this may not correct the issue. Also from the Microsoft Docs:
Specifies that all backup sets should be overwritten, but preserves the media header. If INIT is specified, any existing backup set on that device is overwritten, if conditions permit. By default, BACKUP checks for the following conditions and does not overwrite the backup media if either condition exists:
- Any backup set has not yet expired. For more information, see the EXPIREDATE and RETAINDAYS options.
- The backup set name given in the BACKUP statement, if provided, does not match the name on the backup media. For more information, see the NAME option, earlier in this section.
edited 1 hour ago
answered 1 hour ago
Max Vernon
49.5k13108213
49.5k13108213
Please add the reference to the doc pages. There are useful remarks related to these two subjects
â clifton_h
1 hour ago
When you say "completely obliterating the backup file, or tape", do you mean it can impact the entire tape. So if tape has 5 media sets then creating a new backup with the FORMAT option will destroy entire tape? Please guide.
â variable
1 hour ago
Yes, backing up to tape usingWITH FORMAT
completely eradicates the content of the tape. It overwrites the header section of the tape, rendering the contents after that section unreadable.
â Max Vernon
1 hour ago
So if the tape were a disk drive, then would it eradicate entire disk? I thought media set meant just the .bak file...
â variable
1 hour ago
"So if the tape were a disk drive" no. ADisk
backup device is a single file, not an entire disk. For Disk backups you almost always just use a new file for each backup.
â David Browne - Microsoft
1 hour ago
add a comment |Â
Please add the reference to the doc pages. There are useful remarks related to these two subjects
â clifton_h
1 hour ago
When you say "completely obliterating the backup file, or tape", do you mean it can impact the entire tape. So if tape has 5 media sets then creating a new backup with the FORMAT option will destroy entire tape? Please guide.
â variable
1 hour ago
Yes, backing up to tape usingWITH FORMAT
completely eradicates the content of the tape. It overwrites the header section of the tape, rendering the contents after that section unreadable.
â Max Vernon
1 hour ago
So if the tape were a disk drive, then would it eradicate entire disk? I thought media set meant just the .bak file...
â variable
1 hour ago
"So if the tape were a disk drive" no. ADisk
backup device is a single file, not an entire disk. For Disk backups you almost always just use a new file for each backup.
â David Browne - Microsoft
1 hour ago
Please add the reference to the doc pages. There are useful remarks related to these two subjects
â clifton_h
1 hour ago
Please add the reference to the doc pages. There are useful remarks related to these two subjects
â clifton_h
1 hour ago
When you say "completely obliterating the backup file, or tape", do you mean it can impact the entire tape. So if tape has 5 media sets then creating a new backup with the FORMAT option will destroy entire tape? Please guide.
â variable
1 hour ago
When you say "completely obliterating the backup file, or tape", do you mean it can impact the entire tape. So if tape has 5 media sets then creating a new backup with the FORMAT option will destroy entire tape? Please guide.
â variable
1 hour ago
Yes, backing up to tape using
WITH FORMAT
completely eradicates the content of the tape. It overwrites the header section of the tape, rendering the contents after that section unreadable.â Max Vernon
1 hour ago
Yes, backing up to tape using
WITH FORMAT
completely eradicates the content of the tape. It overwrites the header section of the tape, rendering the contents after that section unreadable.â Max Vernon
1 hour ago
So if the tape were a disk drive, then would it eradicate entire disk? I thought media set meant just the .bak file...
â variable
1 hour ago
So if the tape were a disk drive, then would it eradicate entire disk? I thought media set meant just the .bak file...
â variable
1 hour ago
"So if the tape were a disk drive" no. A
Disk
backup device is a single file, not an entire disk. For Disk backups you almost always just use a new file for each backup.â David Browne - Microsoft
1 hour ago
"So if the tape were a disk drive" no. A
Disk
backup device is a single file, not an entire disk. For Disk backups you almost always just use a new file for each backup.â David Browne - Microsoft
1 hour ago
add a comment |Â
up vote
0
down vote
Complementing to what Max answered, one case that I found where you need to use both FORMAT
and INIT
is when TDE is enabled for your database.
You can see my question - Unable to restore TDE enabled database when MAXTRANSFERSIZE and CHECKSUM is used and answers.
Apparently, it was a bug in sql server which the PG team confirmed :-)
add a comment |Â
up vote
0
down vote
Complementing to what Max answered, one case that I found where you need to use both FORMAT
and INIT
is when TDE is enabled for your database.
You can see my question - Unable to restore TDE enabled database when MAXTRANSFERSIZE and CHECKSUM is used and answers.
Apparently, it was a bug in sql server which the PG team confirmed :-)
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Complementing to what Max answered, one case that I found where you need to use both FORMAT
and INIT
is when TDE is enabled for your database.
You can see my question - Unable to restore TDE enabled database when MAXTRANSFERSIZE and CHECKSUM is used and answers.
Apparently, it was a bug in sql server which the PG team confirmed :-)
Complementing to what Max answered, one case that I found where you need to use both FORMAT
and INIT
is when TDE is enabled for your database.
You can see my question - Unable to restore TDE enabled database when MAXTRANSFERSIZE and CHECKSUM is used and answers.
Apparently, it was a bug in sql server which the PG team confirmed :-)
answered 21 mins ago
Kin
51.6k478185
51.6k478185
add a comment |Â
add a comment |Â
variable is a new contributor. Be nice, and check out our Code of Conduct.
variable is a new contributor. Be nice, and check out our Code of Conduct.
variable is a new contributor. Be nice, and check out our Code of Conduct.
variable is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f219960%2fdatabase-backup-use-case-of-format-and-init%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
2
I disagree. I think this is accurate enough. The Docs explicitly explain the difference as one changing the media and the other changing the backup header. One replaced the file the other invalidates any striped media set.
â clifton_h
1 hour ago
@clifton_h comment deleted as the OP has been clarified.
â George.Palacios
51 mins ago