delete old backups

  • Hello, i have an issue to delete old backup files and this should work regularly. How to do this? I'm on Sql Server 2008r2 Thanks in advance

  • I would suggest to use the Maintenance Cleanup Task to remove old files related to maintenance plans, including text reports created by maintenance plans and database backup files. The Maintenance Cleanup task does not automatically delete files in the subfolders of the specified directory. This feature reduces the possibility of a malicious attack that uses the Maintenance Cleanup task to delete files. msdn.microsoft.com/en-us/library/ms177182.aspx and sqlbak.com/blog/scheduling-backup-cleanup/

  • Just use Powershell. Here's an example script that will do what you need.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Have you tried Maintenance Plans in SSMS.

    In SSMS

    Connect to server

    Go to Management

    Right Click on Maintenance Plans

    Click Maintenance Plan Wizard

    You can create a maintenance plan and assign a schedule to run.

    Good Luck

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

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