| Author |
Topic  |
|
|
Alditus_uy
Starting Member
Uruguay
2 Posts |
Posted - 05/20/2012 : 11:30:20
|
Hello, what would it be the best way to backup a database to the same filename every day? Example: Database : Production1 Backup: every day generate a file "Production1.bkf" Thanks a lot
|
|
|
jeffw8713
Aged Yak Warrior
USA
696 Posts |
Posted - 05/20/2012 : 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
Flowing Fount of Yak Knowledge
2937 Posts |
Posted - 05/20/2012 : 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)
USA
6997 Posts |
Posted - 05/21/2012 : 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
USA
696 Posts |
Posted - 05/21/2012 : 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
Flowing Fount of Yak Knowledge
2937 Posts |
Posted - 05/21/2012 : 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
USA
15559 Posts |
Posted - 05/21/2012 : 15:06:29
|
quote: Originally posted by Sachin.Nand Corruption 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
Flowing Fount of Yak Knowledge
2937 Posts |
Posted - 05/21/2012 : 15:39:19
|
quote: Originally posted by robvolk
quote: Originally posted by Sachin.Nand Corruption 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
Uruguay
2 Posts |
Posted - 05/23/2012 : 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!
|
 |
|
| |
Topic  |
|