Full backup is not overwriting?

  • Yeah,

    Iam using below script to full backup of databases. And I created a job to run every day at 12AM. It should overwrite the previous day's full backups. But in My case it is not overwriting. WITH INIT option should overwrite. Do I need to change any other options?

    BACKUP DATABASE @DBName

    TO DISK = @BackupPath

    WITH NOFORMAT, INIT, NAME = @BackupName,

    SKIP, NOREWIND, NOUNLOAD, STATS = 10

    thanks in advance

  • if you generate backup script from management studio either for APPEND option OR for OVERWRTIE option

    ,you cant see any difference in scripts.

    only you can do is ,generate a backup script by choosing OVERWRITE EXISTING DATABASE in option TAB.because i feel that whenever you created your script the APPEND option was selected.

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • Are you actually backing up to disk? Or is it to tape? You have a whole bunch of things in there which seem to conflict.

    Have you tried to break it down, such as

    BACKUP DATABASE @DBName

    TO DISK = @BackupPath

    WITH INIT

    , NAME = @BackupName

    , STATS = 10



    Shamless self promotion - read my blog http://sirsql.net

  • if you execute your script in a windows command window (a la DOS), using sqlcmd, do you get the same results, or does it properly overwrite? If using sqlcmd works properly, then you will probably have to delete and recreate your job.

    Since you are using variables for the database name, backup name, etc, this implies there's a 'wrapper' around your script. That wrapper may have settings which override what you see explicitly in your script (see earlier post's reference to HOW the script was created).

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply