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 2000 Forums
 SQL Server Administration (2000)
 Backup, always the same file name

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 : Production1
Backup: 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;
Go to Top of Page

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 ....
Go to Top of Page

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
Go to Top of Page

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?
Go to Top of Page

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 ....
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2012-05-21 : 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.
Go to Top of Page

Sachin.Nand

2937 Posts

Posted - 2012-05-21 : 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 ....
Go to Top of Page

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!

Go to Top of Page
   

- Advertisement -