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.
Author |
Topic |
Alditus_uy
Starting Member
2 Posts |
Posted - 2012-05-20 : 11:30:20
|
Hello, what would it be the best way to backup a database to the same filename every day? Example:Database : Production1Backup: every day generate a file "Production1.bkf"Thanks a lot |
|
jeffw8713
Aged Yak Warrior
819 Posts |
Posted - 2012-05-20 : 11:49:41
|
I would not recommend doing this - because it is too easy to lose your backup chain and get into a situation where you cannot restore your system. If you are not copying that file to other media or location - as soon as you initialize the backup file you have no way to go back to the previous backup if needed.With that said, it can be done using the backup command:BACKUP DATABASE {database} TO DISK = {filename} WITH INIT; |
|
|
Sachin.Nand
2937 Posts |
Posted - 2012-05-20 : 13:08:30
|
Not sure how the backup chain will be lost if backups are restored on the same file.After Monday and Tuesday even the calendar says W T F .... |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2012-05-21 : 12:54:55
|
quote: Originally posted by Sachin.Nand Not sure how the backup chain will be lost if backups are restored on the same file.After Monday and Tuesday even the calendar says W T F ....
If that is the only backup and it is run with INIT, then there would be no backup available from the time the backup starts running until it completes.CODO ERGO SUM |
|
|
jeffw8713
Aged Yak Warrior
819 Posts |
Posted - 2012-05-21 : 13:16:44
|
quote: Originally posted by Sachin.Nand Not sure how the backup chain will be lost if backups are restored on the same file.After Monday and Tuesday even the calendar says W T F ....
If you initialize the file, and that file was not backed up to tape or copied to another system - how would you restore to the previous backup if that file becomes corrupted? |
|
|
Sachin.Nand
2937 Posts |
Posted - 2012-05-21 : 14:55:23
|
quote: Originally posted by jeffw8713
quote: Originally posted by Sachin.Nand Not sure how the backup chain will be lost if backups are restored on the same file.After Monday and Tuesday even the calendar says W T F ....
If you initialize the file, and that file was not backed up to tape or copied to another system - how would you restore to the previous backup if that file becomes corrupted?
Corruption is a different thing.Backup chain is a terminology limited only to log backups.After Monday and Tuesday even the calendar says W T F .... |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2012-05-21 : 15:06:29
|
quote: Originally posted by Sachin.NandCorruption is a different thing.Backup chain is a terminology limited only to log backups.
You need a full database backup before you can have any log backups, and therefore any backup chain. |
|
|
Sachin.Nand
2937 Posts |
Posted - 2012-05-21 : 15:39:19
|
quote: Originally posted by robvolk
quote: Originally posted by Sachin.NandCorruption is a different thing.Backup chain is a terminology limited only to log backups.
You need a full database backup before you can have any log backups, and therefore any backup chain.
I know that.But the context of the discussion here is about setting up INIT option for a full backup and then loosing a backup chain as claimed by jeff.After Monday and Tuesday even the calendar says W T F .... |
|
|
Alditus_uy
Starting Member
2 Posts |
Posted - 2012-05-23 : 12:33:35
|
Hey, thanks for your answers, I do a backup to tape, and this backup holds "the last tree copies" for all files, so, It wolud be fine doing the solution proposed.Thanks a lot! |
|
|
|
|
|
|
|