Backup files not overwritten

  • Hi

    We are backing up the database once a day and the transaction log every hour from 8am to 9pm with a maintenance plan. To avoid filling up the directory we put retainday of 2, but the files remain and won't be overwritten. The amount of files should then be limited with retainday, or?

    Thanks for help

    Jan

  • Use Maintenance Cleanup Task to delete older BAK files.

  • Ok, habent seen this task.

    So the files are only overwritten if not enough space is available on disc?

  • No. It doen't overwrite existing file as the new file names are different.

    It deletes older BAK files. So free space will be created.

    Are you backing up to same file?

  • The same db, so the name is like cosy_backup_200711182200.bak what is over 2 days old but isn't deleted.

  • Did the Maintenace Plan run?

    Check the history.

    Have you mentioned the correct file path and extention.

    Check how many days are there (default is weeks)

    It should work.

    It is very simple and easy.

  • You also need to verify that you are in fact writing the latest file. The process that the maint plan uses is to write the new file then remove the old file. IF you are not removing the older files it may be because the new file is not being written.

    Free space is your friend when backing up..... : )

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

  • JanM (11/21/2007)


    ...the name is like cosy_backup_200711182200.bak what is over 2 days old but isn't deleted.

    Jan,

    two possible reasons spring to my mind.

    First of all it is possible that the backup job sometimes finishes earlier than the day before and when it checks the old files they are just under 1 (or in your case 2) day(s) old. But then the file should be removed the next day (at least if you have enough space on the disk). That's they I changed my cleanup jobs to remove everything older than 23 hours.

    Another possibility why the old file isn't removed is that pre-SP1 version of maintenance plan wouldn't remove old backup files in a subdirectory. So you better check your version.

    Hope this helps

    Markus

    [font="Verdana"]Markus Bohse[/font]

Viewing 8 posts - 1 through 7 (of 7 total)

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