I am using:
BACKUP DATABASE XXX TO DISK = @.MyFile
-- If @.MyFile exists, i want to overwrite it. The help file says "Use
the INIT clause to overwrite the backup media, and write the backup as
the first file ... ". This sounds like it will clean-up my entire D-
Drive and then do the backup. It should simply overwrite the specific
file @.MyFile if it exists. I just want to be a 100% sure before I run
this command.
Thanks,
JayWITH INIT = delete all the backups in your backup device, which is the .BAK
file you specified. This means, everytime you backup, you only have the
backup from the last time the backup command executed.
"Jay" <jay6447@.hotmail.com> wrote in message
news:1183609141.844241.152410@.d30g2000prg.googlegroups.com...
> I am using:
> BACKUP DATABASE XXX TO DISK = @.MyFile
> -- If @.MyFile exists, i want to overwrite it. The help file says "Use
> the INIT clause to overwrite the backup media, and write the backup as
> the first file ... ". This sounds like it will clean-up my entire D-
> Drive and then do the backup. It should simply overwrite the specific
> file @.MyFile if it exists. I just want to be a 100% sure before I run
> this command.
> Thanks,
> Jay
>|||Jay
It will NOT clean your entire drive. Think about it, as if you backup
database on C:\ drive BACKUP DATABASE commnad would destroy the OS ?
BOL says
INIT
Specifies that all backup sets should be overwritten, but preserves the
media header. If INIT is specified, any existing backup set data on that
device is overwritten.
"Jay" <jay6447@.hotmail.com> wrote in message
news:1183609141.844241.152410@.d30g2000prg.googlegroups.com...
> I am using:
> BACKUP DATABASE XXX TO DISK = @.MyFile
> -- If @.MyFile exists, i want to overwrite it. The help file says "Use
> the INIT clause to overwrite the backup media, and write the backup as
> the first file ... ". This sounds like it will clean-up my entire D-
> Drive and then do the backup. It should simply overwrite the specific
> file @.MyFile if it exists. I just want to be a 100% sure before I run
> this command.
> Thanks,
> Jay
>|||OK, does this mean that if I have older backup files like
(MYDB_20061231.bak, MYDB_20070101.bak....) they all will be deleted?
On Jul 5, 10:18 am, "Uri Dimant" <u...@.iscar.co.il> wrote:
> Jay
> It will NOT clean your entire drive. Think about it, as if you backup
> database on C:\ drive BACKUP DATABASE commnad would destroy the OS ?
> BOL says
> INIT
> Specifies that all backup sets should be overwritten, but preserves the
> media header. If INIT is specified, any existing backup set data on that
> device is overwritten.
> "Jay" <jay6...@.hotmail.com> wrote in message
> news:1183609141.844241.152410@.d30g2000prg.googlegroups.com...
>
>
>
>
>
>
> - Show quoted text -|||Jay
if MYDB_20061231.bak contains more than one file and you issue BACKUP
DATABASE db to disk='c:\MYDB_20061231.bak' WITH INIT so YES it will be
overwritten
"Jay" <jay6447@.hotmail.com> wrote in message
news:1183614106.316025.235930@.j4g2000prf.googlegroups.com...
> OK, does this mean that if I have older backup files like
> (MYDB_20061231.bak, MYDB_20070101.bak....) they all will be deleted?
>
> On Jul 5, 10:18 am, "Uri Dimant" <u...@.iscar.co.il> wrote:
>|||OK - thanks. I got it. I didn't know a backup file can contain more
than one backups.
On Jul 5, 10:58 am, "Uri Dimant" <u...@.iscar.co.il> wrote:
> Jay
> if MYDB_20061231.bak contains more than one file and you issue BACKUP
> DATABASE db to disk='c:\MYDB_20061231.bak' WITH INIT so YES it will be
> overwritten
> "Jay" <jay6...@.hotmail.com> wrote in message
> news:1183614106.316025.235930@.j4g2000prf.googlegroups.com...
>
>
>
>
>
>
>
>
>
>
> - Show quoted text -sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment